Commit fb9ada36c2257ca02b7130a9a6c67f3c0d5a7be9

constantoine 2022-11-02T11:33:26

cargo fmt Signed-off-by: constantoine <cleo.rebert-ext@treezor.com>

diff --git a/src/lib.rs b/src/lib.rs
index f50edf4..3b1a9d4 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -191,9 +191,7 @@ impl core::fmt::Display for TOTP {
         write!(
             f,
             "digits: {}; step: {}; alg: {}",
-            self.digits,
-            self.step,
-            self.algorithm,
+            self.digits, self.step, self.algorithm,
         )
     }
 }
@@ -563,10 +561,11 @@ impl<T: AsRef<[u8]>> TOTP<T> {
         let url = self.get_url();
         let mut vec = Vec::new();
 
-        let qr: Result<qrcodegen::QrCode, String> = match qrcodegen::QrCode::encode_text(&url, qrcodegen::QrCodeEcc::Medium) {
-            Ok(qr) => Ok(qr),
-            Err(err) => Err(err.to_string())
-        };
+        let qr: Result<qrcodegen::QrCode, String> =
+            match qrcodegen::QrCode::encode_text(&url, qrcodegen::QrCodeEcc::Medium) {
+                Ok(qr) => Ok(qr),
+                Err(err) => Err(err.to_string()),
+            };
 
         if qr.is_err() {
             return Err(qr.err().unwrap());
@@ -589,7 +588,7 @@ impl<T: AsRef<[u8]>> TOTP<T> {
             image::ColorType::L8,
         ) {
             Ok(_) => Ok(base64::encode(vec)),
-            Err(err) => Err(err.to_string())
+            Err(err) => Err(err.to_string()),
         }
     }
 }