Skip to content

Commit

Permalink
Upgrade Cargo packages & fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Ethan Nguyen authored and ethan605 committed Dec 28, 2022
1 parent f24c545 commit 8fb579a
Show file tree
Hide file tree
Showing 3 changed files with 167 additions and 38 deletions.
201 changes: 165 additions & 36 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/prelude/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ impl Xkpasswd {

let passwd = match settings.adjust_padding(passwd.len()) {
PaddingResult::Unchanged => passwd,
PaddingResult::TrimTo(len) => passwd[..len as usize].to_string(),
PaddingResult::TrimTo(len) => passwd[..len].to_string(),
PaddingResult::Pad(padded_symbols) => passwd + &padded_symbols,
};

Expand Down
2 changes: 1 addition & 1 deletion src/settings/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ impl Randomizer for Settings {
cmp::Ordering::Less => {
log::debug!(
"trimmed {} characters to fit padding strategy",
pass_length - len as usize
pass_length - len
);

PaddingResult::TrimTo(len)
Expand Down

0 comments on commit 8fb579a

Please sign in to comment.