mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
clippy: Fix many warnings in components/script
(#31717)
* Fix Several clippy warnings * Fix Build errors * Fix Unused import * Fix requested changes * Fix rustfmt * Minor fixes --------- Co-authored-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
parent
676f655647
commit
01ca220f83
41 changed files with 200 additions and 212 deletions
|
@ -31,7 +31,7 @@ pub fn load_script(head: &HTMLHeadElement) {
|
|||
rooted!(in(*cx) let mut rval = UndefinedValue());
|
||||
|
||||
let path = PathBuf::from(&path_str);
|
||||
let mut files = read_dir(&path)
|
||||
let mut files = read_dir(path)
|
||||
.expect("Bad path passed to --userscripts")
|
||||
.filter_map(|e| e.ok())
|
||||
.map(|e| e.path())
|
||||
|
@ -52,7 +52,7 @@ pub fn load_script(head: &HTMLHeadElement) {
|
|||
&file.to_string_lossy(),
|
||||
rval.handle_mut(),
|
||||
1,
|
||||
ScriptFetchOptions::default_classic_script(&global),
|
||||
ScriptFetchOptions::default_classic_script(global),
|
||||
global.api_base_url(),
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue