print once when unknown algo

This commit is contained in:
2019-11-24 13:06:42 +08:00
parent df87aac2fa
commit f742c18de1

View File

@@ -75,7 +75,10 @@ fn main() -> XResult<()> {
},
None => match the_algo.as_str() {
"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(());
},
},
};
}