server-util: Fix clippy lints

This commit is contained in:
Jonas Platte 2022-06-29 14:22:13 +02:00
parent 8b21519d25
commit 803fd38f99
No known key found for this signature in database
GPG Key ID: AAA7A61F696C3E0C

View File

@ -86,7 +86,7 @@ fn parse_quoted<'a>(tokens: &mut impl Tokens<Item = &'a u8>) -> Option<Vec<u8>>
false false
} }
})?; })?;
buffer.push(*escaped) buffer.push(*escaped);
} }
// end of quote // end of quote
b'"' => break, b'"' => break,
@ -252,7 +252,7 @@ mod tests {
); );
let origin = "origin.hs.example.com".try_into().unwrap(); let origin = "origin.hs.example.com".try_into().unwrap();
let key = "ed25519:key1".try_into().unwrap(); let key = "ed25519:key1".try_into().unwrap();
let sig = "ABCDEF...".to_string(); let sig = "ABCDEF...".to_owned();
let credentials: XMatrix = Credentials::decode(&header).unwrap(); let credentials: XMatrix = Credentials::decode(&header).unwrap();
assert_eq!(credentials.origin, origin); assert_eq!(credentials.origin, origin);
assert_eq!(credentials.destination, None); assert_eq!(credentials.destination, None);
@ -270,7 +270,7 @@ mod tests {
let origin: OwnedServerName = "origin.hs.example.com".try_into().unwrap(); let origin: OwnedServerName = "origin.hs.example.com".try_into().unwrap();
let destination: OwnedServerName = "destination.hs.example.com".try_into().unwrap(); let destination: OwnedServerName = "destination.hs.example.com".try_into().unwrap();
let key = "ed25519:key1".try_into().unwrap(); let key = "ed25519:key1".try_into().unwrap();
let sig = "ABCDEF...".to_string(); let sig = "ABCDEF...".to_owned();
let credentials: XMatrix = Credentials::decode(&header).unwrap(); let credentials: XMatrix = Credentials::decode(&header).unwrap();
assert_eq!(credentials.origin, origin); assert_eq!(credentials.origin, origin);
assert_eq!(credentials.destination, Some(destination.clone())); assert_eq!(credentials.destination, Some(destination.clone()));