Fix cargo clippy issues #407

Merged
pierre merged 2 commits from cargo-clippy into master 2025-06-06 06:11:08 +00:00
Showing only changes of commit 9211f671ab - Show all commits

View File

@ -1,5 +1,3 @@
use std::io::ErrorKind;
use base32::Alphabet;
use rand::Rng;
use totp_rfc6238::{HashAlgorithm, TotpGenerator};
@ -90,8 +88,7 @@ impl TotpKey {
let key = match base32::decode(BASE32_ALPHABET, &self.encoded) {
None => {
return Err(Box::new(std::io::Error::new(
ErrorKind::Other,
return Err(Box::new(std::io::Error::other(
"Failed to decode base32 secret!",
)));
}