Skip to content

Commit

Permalink
Run formatting (#1202)
Browse files Browse the repository at this point in the history
  • Loading branch information
ellie authored Aug 30, 2023
1 parent 340b9d8 commit dead8f3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
8 changes: 6 additions & 2 deletions atuin-common/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}

Expand Down
4 changes: 3 additions & 1 deletion atuin-server/src/handlers/user.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}

Expand Down

1 comment on commit dead8f3

@vercel
Copy link

@vercel vercel bot commented on dead8f3 Aug 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

atuin-docs – ./

atuin-docs-atuin.vercel.app
atuin-docs-git-main-atuin.vercel.app
atuin-docs.vercel.app

Please sign in to comment.