print once when unknown algo
This commit is contained in:
@@ -75,7 +75,10 @@ fn main() -> XResult<()> {
|
|||||||
},
|
},
|
||||||
None => match the_algo.as_str() {
|
None => match the_algo.as_str() {
|
||||||
"SM3" => println!("{} - {} ({})", hex::encode(Sm3Hash::new(&read_file_full(the_fn)?).get_hash()), the_fn, the_algo),
|
"SM3" => println!("{} - {} ({})", hex::encode(Sm3Hash::new(&read_file_full(the_fn)?).get_hash()), the_fn, the_algo),
|
||||||
_ => print_message(MessageType::ERROR, &format!("Unknown algorithm: {}", options.algorithm)),
|
_ => {
|
||||||
|
print_message(MessageType::ERROR, &format!("Unknown algorithm: {}", options.algorithm));
|
||||||
|
return Ok(());
|
||||||
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user