mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
fix many clippy warnings (#33510)
Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>
This commit is contained in:
parent
4e4b137eaa
commit
f986160ed4
13 changed files with 29 additions and 34 deletions
|
@ -37,7 +37,7 @@ pub fn get_decode_and_split_header_name(name: &str, headers: &HeaderMap) -> Opti
|
|||
// Step 1: Let value be the result of getting name from list.
|
||||
// Step 2: If value is null, then return null.
|
||||
// Step 3: Return the result of getting, decoding, and splitting value.
|
||||
get_value_from_header_list(name, headers).map(|value| get_decode_and_split_header_value(value))
|
||||
get_value_from_header_list(name, headers).map(get_decode_and_split_header_value)
|
||||
}
|
||||
|
||||
/// <https://fetch.spec.whatwg.org/#header-value-get-decode-and-split>
|
||||
|
@ -93,7 +93,7 @@ pub fn get_decode_and_split_header_value(value: Vec<u8>) -> Vec<String> {
|
|||
temporary_value = String::new();
|
||||
}
|
||||
|
||||
return values;
|
||||
values
|
||||
}
|
||||
|
||||
/// <https://infra.spec.whatwg.org/#collect-a-sequence-of-code-points>
|
||||
|
|
|
@ -28,7 +28,7 @@ pub struct PubDomainRules {
|
|||
exceptions: HashSet<String>,
|
||||
}
|
||||
|
||||
static PUB_DOMAINS: LazyLock<PubDomainRules> = LazyLock::new(|| load_pub_domains());
|
||||
static PUB_DOMAINS: LazyLock<PubDomainRules> = LazyLock::new(load_pub_domains);
|
||||
|
||||
impl<'a> FromIterator<&'a str> for PubDomainRules {
|
||||
fn from_iter<T>(iter: T) -> Self
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue