mirror of
https://github.com/servo/servo.git
synced 2025-08-16 19:05:33 +01:00
clippy: fix warnings on modules outside components (#31567)
This commit is contained in:
parent
3b19189896
commit
6c7fe31db1
9 changed files with 37 additions and 46 deletions
|
@ -28,17 +28,14 @@ pub fn get_default_url(
|
|||
// If the url is not provided, we fallback to the homepage in prefs,
|
||||
// or a blank page in case the homepage is not set either.
|
||||
let mut new_url = None;
|
||||
let cmdline_url = url_opt
|
||||
.clone()
|
||||
.map(|s| s.to_string())
|
||||
.and_then(|url_string| {
|
||||
parse_url_or_filename(cwd.as_ref(), &url_string)
|
||||
.map_err(|error| {
|
||||
warn!("URL parsing failed ({:?}).", error);
|
||||
error
|
||||
})
|
||||
.ok()
|
||||
});
|
||||
let cmdline_url = url_opt.map(|s| s.to_string()).and_then(|url_string| {
|
||||
parse_url_or_filename(cwd.as_ref(), &url_string)
|
||||
.map_err(|error| {
|
||||
warn!("URL parsing failed ({:?}).", error);
|
||||
error
|
||||
})
|
||||
.ok()
|
||||
});
|
||||
|
||||
if let Some(url) = cmdline_url.clone() {
|
||||
// Check if the URL path corresponds to a file
|
||||
|
@ -50,7 +47,7 @@ pub fn get_default_url(
|
|||
}
|
||||
}
|
||||
|
||||
if new_url.is_none() && !url_opt.is_none() {
|
||||
if new_url.is_none() && url_opt.is_some() {
|
||||
new_url = location_bar_input_to_url(url_opt.unwrap());
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue