From 0374abb9367100d9b1c53633d25fbdd933d8316c Mon Sep 17 00:00:00 2001 From: Dennis Eriksen Date: Thu, 29 Feb 2024 23:03:14 +0100 Subject: linting rust-version --- src/rust/src/main.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/rust/src/main.rs b/src/rust/src/main.rs index 083a99f..7d4463c 100644 --- a/src/rust/src/main.rs +++ b/src/rust/src/main.rs @@ -165,13 +165,13 @@ fn main() { // Fill in common print data let data = CommonPrintData { - length: length, + length, alpha: &alpha, alnum: &alnum, - printbool: printbool, - printlen: printlen, - col_width: col_width, - col_num: col_num, + printbool, + printlen, + col_width, + col_num, }; // @@ -181,7 +181,7 @@ fn main() { // Normal passwords print_columns("Normal passwords", number, &normal, &data); - println!(""); + println!(); // Special passwords print_columns( @@ -203,7 +203,7 @@ fn main() { let words = reader.lines().map(|l| l.unwrap()).collect(); // Print - println!(""); + println!(); println!("Passphrases:"); for _ in 0..number / 2 { @@ -215,7 +215,7 @@ fn main() { // // Print passwords in neat columns // -fn print_columns(title: &str, num: u8, chars: &Vec, data: &CommonPrintData) { +fn print_columns(title: &str, num: u8, chars: &[char], data: &CommonPrintData) { let mut strings: Vec = Vec::new(); for _ in 0..num { strings.push(randstring(data.length, chars, data.alpha, data.alnum)); -- cgit v1.2.3