diff --git a/atuin-common/src/utils.rs b/atuin-common/src/utils.rs index d2db3ac..ed98e27 100644 --- a/atuin-common/src/utils.rs +++ b/atuin-common/src/utils.rs @@ -112,8 +112,12 @@ pub fn get_current_dir() -> String { } pub fn get_days_from_month(year: i32, month: u32) -> i64 { - let Some(start) = NaiveDate::from_ymd_opt(year, month, 1) else { return 30 }; - let Some(end) = start.checked_add_months(Months::new(1)) else { return 30 }; + let Some(start) = NaiveDate::from_ymd_opt(year, month, 1) else { + return 30; + }; + let Some(end) = start.checked_add_months(Months::new(1)) else { + return 30; + }; end.signed_duration_since(start).num_days() } diff --git a/atuin-server/src/handlers/user.rs b/atuin-server/src/handlers/user.rs index 7508115..4f2ad89 100644 --- a/atuin-server/src/handlers/user.rs +++ b/atuin-server/src/handlers/user.rs @@ -28,7 +28,9 @@ use atuin_common::api::*; pub fn verify_str(hash: &str, password: &str) -> bool { let arg2 = Argon2::new(Algorithm::Argon2id, Version::V0x13, Params::default()); - let Ok(hash) = PasswordHash::new(hash) else { return false }; + let Ok(hash) = PasswordHash::new(hash) else { + return false; + }; arg2.verify_password(password.as_bytes(), &hash).is_ok() }