clippy: Fix manual_map warnings (#31922)

This commit is contained in:
Oluwatobi Sofela 2024-03-28 16:58:36 +01:00 committed by GitHub
parent 5d518ca8dc
commit 7349ce5b6a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 34 additions and 51 deletions

View file

@ -3352,10 +3352,10 @@ impl ScriptThread {
_ => IsHTMLDocument::HTMLDocument,
};
let referrer = match metadata.referrer {
Some(ref referrer) => Some(referrer.clone().into_string()),
None => None,
};
let referrer = metadata
.referrer
.as_ref()
.map(|referrer| referrer.clone().into_string());
let referrer_policy = metadata
.headers