From 6f8173f67ac45860a25993111809039c48fee197 Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Sun, 10 Apr 2022 12:34:41 +0200 Subject: [PATCH] tfa: rustfmt Signed-off-by: Thomas Lamprecht --- proxmox-tfa/src/totp.rs | 15 +++------------ proxmox-tfa/src/u2f.rs | 6 ++---- 2 files changed, 5 insertions(+), 16 deletions(-) diff --git a/proxmox-tfa/src/totp.rs b/proxmox-tfa/src/totp.rs index b0c417fc..5f10fe6e 100644 --- a/proxmox-tfa/src/totp.rs +++ b/proxmox-tfa/src/totp.rs @@ -524,10 +524,7 @@ fn test_otp() { let parsed: Totp = uri.parse().expect("failed to parse otp uri"); assert_eq!(parsed, hotp); assert_eq!(parsed.issuer, None); - assert_eq!( - parsed.account_name.as_deref(), - Some("My Account") - ); + assert_eq!(parsed.account_name.as_deref(), Some("My Account")); const SECRET_2: &str = "a60b1b20679b1a64e21a"; const EXPECTED: &str = "7757717"; @@ -557,12 +554,6 @@ fn test_otp() { let uri = totp.to_uri().expect("failed to create otpauth uri"); let parsed: Totp = uri.parse().expect("failed to parse otp uri"); assert_eq!(parsed, totp); - assert_eq!( - parsed.issuer.as_deref(), - Some("An Issuer") - ); - assert_eq!( - parsed.account_name.as_deref(), - Some("The Account Name") - ); + assert_eq!(parsed.issuer.as_deref(), Some("An Issuer")); + assert_eq!(parsed.account_name.as_deref(), Some("The Account Name")); } diff --git a/proxmox-tfa/src/u2f.rs b/proxmox-tfa/src/u2f.rs index f543c63f..7e634230 100644 --- a/proxmox-tfa/src/u2f.rs +++ b/proxmox-tfa/src/u2f.rs @@ -521,8 +521,7 @@ mod test { response: super::RegistrationResponse, } - let ts: TestChallenge = - serde_json::from_str(data).expect("failed to parse json test data"); + let ts: TestChallenge = serde_json::from_str(data).expect("failed to parse json test data"); let context = super::U2f::new(TEST_APPID.to_string(), TEST_APPID.to_string()); let res = context @@ -545,8 +544,7 @@ mod test { response: super::AuthResponse, } - let ts: TestChallenge = - serde_json::from_str(data).expect("failed to parse json test data"); + let ts: TestChallenge = serde_json::from_str(data).expect("failed to parse json test data"); let context = super::U2f::new(TEST_APPID.to_string(), TEST_APPID.to_string()); let res = context