diff --git a/src/api/admin.rs b/src/api/admin.rs
index a38b5603eb9442d4c3e130cf5bccc78455575092..680c880457332e2aec6c623885fb815aebdf0d99 100644
--- a/src/api/admin.rs
+++ b/src/api/admin.rs
@@ -158,7 +158,7 @@ fn invite_user(data: Json<InviteData>, _token: AdminToken, conn: DbConn) -> Empt
 }
 
 #[get("/users")]
-fn get_users(_token: AdminToken, conn: DbConn) ->JsonResult {
+fn get_users(_token: AdminToken, conn: DbConn) -> JsonResult {
     let users = User::get_all(&conn);
     let users_json: Vec<Value> = users.iter().map(|u| u.to_json(&conn)).collect();
 
diff --git a/src/api/core/ciphers.rs b/src/api/core/ciphers.rs
index 709c9ef08b58c0095978259eaefc76f930b0b0da..f44ad5131a9ad6d64a1b5e6f2f8858360b9f6685 100644
--- a/src/api/core/ciphers.rs
+++ b/src/api/core/ciphers.rs
@@ -877,7 +877,13 @@ struct OrganizationId {
 }
 
 #[post("/ciphers/purge?<organization..>", data = "<data>")]
-fn delete_all(organization: Option<Form<OrganizationId>>, data: JsonUpcase<PasswordData>, headers: Headers, conn: DbConn, nt: Notify) -> EmptyResult {
+fn delete_all(
+    organization: Option<Form<OrganizationId>>,
+    data: JsonUpcase<PasswordData>,
+    headers: Headers,
+    conn: DbConn,
+    nt: Notify,
+) -> EmptyResult {
     let data: PasswordData = data.into_inner().data;
     let password_hash = data.MasterPasswordHash;
 
@@ -903,7 +909,7 @@ fn delete_all(organization: Option<Form<OrganizationId>>, data: JsonUpcase<Passw
                     }
                 }
             }
-        },
+        }
         None => {
             // No organization ID in query params, purging user vault
             // Delete ciphers and their attachments
@@ -919,7 +925,7 @@ fn delete_all(organization: Option<Form<OrganizationId>>, data: JsonUpcase<Passw
             user.update_revision(&conn)?;
             nt.send_user_update(UpdateType::Vault, &user);
             Ok(())
-        },
+        }
     }
 }
 
diff --git a/src/api/core/two_factor.rs b/src/api/core/two_factor.rs
index 7cbec5d0254542671c37cf4f26d655951c3bf792..0d67e5730a12f2f21a807fb615cec49e2b1a6c5f 100644
--- a/src/api/core/two_factor.rs
+++ b/src/api/core/two_factor.rs
@@ -734,7 +734,6 @@ impl DuoData {
             }),
             None => None,
         }
-
     }
     fn msg(s: &str) -> Self {
         Self {
@@ -762,7 +761,6 @@ impl DuoData {
     }
 }
 
-
 enum DuoStatus {
     Global(DuoData), // Using the global duo config
     User(DuoData),   // Using the user's config
@@ -912,7 +910,6 @@ const APP_PREFIX: &str = "APP";
 
 use chrono::Utc;
 
-
 fn get_user_duo_data(uuid: &str, conn: &DbConn) -> DuoStatus {
     let type_ = TwoFactorType::Duo as i32;
 
@@ -940,7 +937,7 @@ fn get_user_duo_data(uuid: &str, conn: &DbConn) -> DuoStatus {
 fn get_duo_keys_email(email: &str, conn: &DbConn) -> ApiResult<(String, String, String, String)> {
     let data = User::find_by_mail(email, &conn)
         .and_then(|u| get_user_duo_data(&u.uuid, &conn).data())
-        .or_else(|| DuoData::global())
+        .or_else(DuoData::global)
         .map_res("Can't fetch Duo keys")?;
 
     Ok((data.ik, data.sk, CONFIG.get_duo_akey(), data.host))
diff --git a/src/crypto.rs b/src/crypto.rs
index e55e461b848d56759ca6e9ae89d9b1701126d46c..968f9eb9b4dfa74e9f1e1ae0811bdd513bb0735a 100644
--- a/src/crypto.rs
+++ b/src/crypto.rs
@@ -2,7 +2,7 @@
 // PBKDF2 derivation
 //
 
-use ring::{digest, pbkdf2, hmac};
+use ring::{digest, hmac, pbkdf2};
 
 static DIGEST_ALG: &digest::Algorithm = &digest::SHA256;
 const OUTPUT_LEN: usize = digest::SHA256_OUTPUT_LEN;
@@ -22,7 +22,7 @@ pub fn verify_password_hash(secret: &[u8], salt: &[u8], previous: &[u8], iterati
 //
 // HMAC
 //
-pub fn hmac_sign(key: &str, data:&str) -> String {
+pub fn hmac_sign(key: &str, data: &str) -> String {
     use data_encoding::HEXLOWER;
 
     let key = hmac::SigningKey::new(&digest::SHA1, key.as_bytes());
diff --git a/src/mail.rs b/src/mail.rs
index 7c4ee324cc951819c103f46cc6589da41aa5c66c..b122f489ac7ad7310ba7452945340a389c103e03 100644
--- a/src/mail.rs
+++ b/src/mail.rs
@@ -1,7 +1,7 @@
 use lettre::smtp::authentication::Credentials;
 use lettre::smtp::ConnectionReuseParameters;
 use lettre::{ClientSecurity, ClientTlsParameters, SmtpClient, SmtpTransport, Transport};
-use lettre_email::{EmailBuilder,PartBuilder,MimeMultipartType};
+use lettre_email::{EmailBuilder, MimeMultipartType, PartBuilder};
 use native_tls::{Protocol, TlsConnector};
 use quoted_printable::encode_to_str;
 
diff --git a/src/main.rs b/src/main.rs
index 42565b642307c2237e18928584568fbae8db942a..0d6c36ead096592a6519e3db76320b0f82bf7773 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -90,9 +90,10 @@ fn init_logging() -> Result<(), fern::InitError> {
     if let Some(log_file) = CONFIG.log_file() {
         logger = logger.chain(fern::log_file(log_file)?);
     }
-    
-    #[cfg(not(windows))] {
-        if cfg!(feature="enable_syslog") || CONFIG.use_syslog() {
+
+    #[cfg(not(windows))]
+    {
+        if cfg!(feature = "enable_syslog") || CONFIG.use_syslog() {
             logger = chain_syslog(logger);
         }
     }