fix linting

Signed-off-by: jmic <jmic@users.noreply.github.com>
This commit is contained in:
jmic
2025-12-20 18:30:23 +01:00
parent a24e527a02
commit d583333780
2 changed files with 4 additions and 3 deletions

View File

@@ -364,7 +364,7 @@ mod tests {
}
#[test]
#[cfg(all(feature = "json"))]
#[cfg(feature = "json")]
fn test_create_json_challenge_sha512() {
let challenge_json = create_json_challenge(ChallengeOptions {
algorithm: Some(AltchaAlgorithm::Sha512),
@@ -375,7 +375,7 @@ mod tests {
expires: Some(DateTime::from_timestamp(1715526541, 0).unwrap()),
..Default::default()
})
.expect("should be ok");
.expect("should be ok");
assert_eq!(
challenge_json,
r#"{"algorithm":"SHA-512","challenge":"30af91a2099af3b64f91f271aeec65c144f8fe9efe0f42d4207a984350ecda2f72ef8fb7f55bc7125f173b0de9160f95c17c65e23dd1da30626f0aed50f4bf88","maxnumber":100000,"salt":"blubb?expires=1715526541&","signature":"12cc3c3c04622fee8d2ea729b5b825dc25344969c07957384f825f7576778df4f6a8fa76ef8d0ec47ca15206c574293613b2dd46f22b24009a974805c91062de"}"#

View File

@@ -84,7 +84,8 @@ pub fn generate_url_from_salt_params(params: &ParamsMapType) -> String {
.iter()
.map(|(key, value)| key.to_owned() + "=" + value)
.reduce(|acc, e| acc + "&" + e.as_str())
.unwrap() + "&"
.unwrap()
+ "&"
}
#[cfg(test)]