chore(clippy): make clippy happy (#3005)

This commit is contained in:
Matthias Seitz
2023-06-06 02:39:13 +02:00
committed by GitHub
parent 6e3b420bf3
commit adf4328cec
2 changed files with 7 additions and 7 deletions

View File

@ -206,10 +206,10 @@ mod tests {
fn from_hex() {
let key = "f79ae8046bc11c9927afe911db7143c51a806c4a537cc08e0d37140b0192f430";
let secret: Result<JwtSecret, _> = JwtSecret::from_hex(key);
assert!(matches!(secret, Ok(_)));
assert!(secret.is_ok());
let secret: Result<JwtSecret, _> = JwtSecret::from_hex(key);
assert!(matches!(secret, Ok(_)));
assert!(secret.is_ok());
}
#[test]
@ -234,7 +234,7 @@ mod tests {
let hex: String =
"0x7365637265747365637265747365637265747365637265747365637265747365".into();
let result = JwtSecret::from_hex(hex);
assert!(matches!(result, Ok(_)));
assert!(result.is_ok());
}
#[test]
@ -359,7 +359,7 @@ mod tests {
let fpath = Path::new("secret2.hex");
write(fpath, "invalid hex");
let result = JwtSecret::from_file(fpath);
assert!(matches!(result, Err(_)));
assert!(result.is_err());
delete(fpath);
}
@ -367,7 +367,7 @@ mod tests {
fn provided_file_not_exists() {
let fpath = Path::new("secret3.hex");
let result = JwtSecret::from_file(fpath);
assert!(matches!(result, Err(_)));
assert!(result.is_err());
assert!(!exists(fpath));
}

View File

@ -85,7 +85,7 @@ mod tests {
fn auth_header_not_available() {
let headers = HeaderMap::new();
let token = get_bearer(&headers);
assert!(matches!(token, None));
assert!(token.is_none());
}
#[test]
@ -95,6 +95,6 @@ mod tests {
let mut headers = HeaderMap::new();
headers.insert(header::AUTHORIZATION, bearer.parse().unwrap());
let token = get_bearer(&headers);
assert!(matches!(token, None));
assert!(token.is_none());
}
}