Fix cargo clippy issues
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2025-07-09 15:05:30 +02:00
parent e3e4e8280c
commit 8a14521d6e
15 changed files with 54 additions and 87 deletions

View File

@@ -22,7 +22,7 @@ impl CodeChallenge {
encoded.eq(&self.code_challenge)
}
s => {
log::error!("Unknown code challenge method: {}", s);
log::error!("Unknown code challenge method: {s}");
false
}
}
@@ -40,8 +40,8 @@ mod test {
code_challenge: "text1".to_string(),
};
assert_eq!(true, chal.verify_code("text1"));
assert_eq!(false, chal.verify_code("text2"));
assert!(chal.verify_code("text1"));
assert!(!chal.verify_code("text2"));
}
#[test]
@@ -51,8 +51,8 @@ mod test {
code_challenge: "uSOvC48D8TMh6RgW-36XppMlMgys-6KAE_wEIev9W2g".to_string(),
};
assert_eq!(true, chal.verify_code("HIwht3lCHfnsruA+7Sq8NP2mPj5cBZe0Ewf23eK9UQhK4TdCIt3SK7Fr/giCdnfjxYQILOPG2D562emggAa2lA=="));
assert_eq!(false, chal.verify_code("text1"));
assert!(chal.verify_code("HIwht3lCHfnsruA+7Sq8NP2mPj5cBZe0Ewf23eK9UQhK4TdCIt3SK7Fr/giCdnfjxYQILOPG2D562emggAa2lA=="));
assert!(!chal.verify_code("text1"));
}
#[test]
@@ -62,10 +62,7 @@ mod test {
code_challenge: "E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM".to_string(),
};
assert_eq!(
true,
chal.verify_code("dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk")
);
assert_eq!(false, chal.verify_code("text1"));
assert!(chal.verify_code("dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk"));
assert!(!chal.verify_code("text1"));
}
}