diff options
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/main.rs b/src/main.rs index b89a381..3a2f4cc 100644 --- a/src/main.rs +++ b/src/main.rs @@ -15,16 +15,15 @@ // along with this program. If not, see <https://www.gnu.org/licenses/>. use checkpw::{check, Password}; -use std::{env, error::Error, thread, time, process}; +use std::{env, error::Error, process, thread, time}; fn print_usage() { println!("Usage: checkpw <pw>..."); } fn main() { - let (args, passwords) : (Vec<String>, Vec<String>) = env::args() - .skip(1) - .partition(|arg| arg.starts_with('-')); + let (args, passwords): (Vec<String>, Vec<String>) = + env::args().skip(1).partition(|arg| arg.starts_with('-')); if args.is_empty() && passwords.is_empty() { print_usage(); @@ -37,8 +36,7 @@ fn main() { for pw in passwords { if first_round { first_round = false; - } - else { + } else { thread::sleep(time::Duration::new(1, 0)); } @@ -48,8 +46,7 @@ fn main() { if num > 0 { println!("Password is PWNED! It was found in {} breaches.", num); pwn_count += 1; - } - else { + } else { println!("Password was not found in any breaches"); } } |