Fix some clippy issues on the Android build (#35147)

This fixes a variety of clippy issues that show up on the Android build.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
Martin Robinson 2025-01-23 16:18:58 +01:00 committed by GitHub
parent 5e5379d3bf
commit f5f5a3f79e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 43 additions and 66 deletions

View file

@ -30,7 +30,7 @@ use crate::egl::servo_glue::{
use crate::prefs::{parse_command_line_arguments, ArgumentParsingResult};
thread_local! {
pub static SERVO: RefCell<Option<ServoGlue>> = RefCell::new(None);
pub static SERVO: RefCell<Option<ServoGlue>> = const { RefCell::new(None) };
}
pub struct InitOptions {
@ -61,7 +61,7 @@ pub fn init(
resources::set(Box::new(ResourceReaderInstance::new()));
// `parse_command_line_arguments` expects the first argument to be the binary name.
let mut args = mem::replace(&mut init_opts.args, vec![]);
let mut args = mem::take(&mut init_opts.args);
args.insert(0, "servo".to_string());
let (opts, preferences, servoshell_preferences) = match parse_command_line_arguments(args) {