Skip to content

Commit

Permalink
use of a fallible conversion when an infallible one could be used (tg…
Browse files Browse the repository at this point in the history
  • Loading branch information
ZeWaka authored and FluffyGhoster committed Mar 24, 2024
1 parent e612619 commit b1667d9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/hash.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ fn totp_generate_tolerance(
) -> Result<String> {
let mut results: Vec<String> = Vec::new();
for i in -tolerance..(tolerance + 1) {
let result = totp_generate(hex_seed, i.try_into().unwrap(), time_override)?;
let result = totp_generate(hex_seed, i.into(), time_override)?;
results.push(result)
}
Ok(serde_json::to_string(&results)?)
Expand Down

0 comments on commit b1667d9

Please sign in to comment.