aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDennis Eriksen <d@ennis.no>2024-02-29 23:03:14 +0100
committerDennis Eriksen <d@ennis.no>2024-02-29 23:03:14 +0100
commit0374abb9367100d9b1c53633d25fbdd933d8316c (patch)
treedcba5e49461b6e39c9389947a58ae513d041051e
parentadding a note on dependencies (diff)
downloadmakepass-main.tar.gz
linting rust-versionHEADmain
-rw-r--r--src/rust/src/main.rs16
1 files 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<char>, data: &CommonPrintData) {
+fn print_columns(title: &str, num: u8, chars: &[char], data: &CommonPrintData) {
let mut strings: Vec<String> = Vec::new();
for _ in 0..num {
strings.push(randstring(data.length, chars, data.alpha, data.alnum));