Skip to content

Commit

Permalink
happy clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
agourlay committed Feb 16, 2024
1 parent 8533ed2 commit 8a04a5b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/password_gen.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use ahash::AHashMap;
use indicatif::ProgressBar;

pub fn password_generator_count(charset: &Vec<char>, min_size: usize, max_size: usize) -> usize {
pub fn password_generator_count(charset: &[char], min_size: usize, max_size: usize) -> usize {
// compute the number of passwords to generate
let charset_len = charset.len();
let mut total_password_count = 0;
Expand Down Expand Up @@ -155,7 +155,7 @@ impl Iterator for PasswordGenerator {
}

pub fn password_generator_iter(
charset: &Vec<char>,
charset: &[char],
min_size: usize,
max_size: usize,
progress_bar: ProgressBar,
Expand All @@ -168,7 +168,7 @@ pub fn password_generator_iter(
charset.len(),
charset.iter().collect::<String>()
));
PasswordGenerator::new(charset.clone(), min_size, max_size, progress_bar)
PasswordGenerator::new(charset.to_vec(), min_size, max_size, progress_bar)
}

#[cfg(test)]
Expand Down

0 comments on commit 8a04a5b

Please sign in to comment.