Skip to content

Commit

Permalink
use of a fallible conversion when an infallible one could be used (#165)
Browse files Browse the repository at this point in the history
  • Loading branch information
ZeWaka authored Jan 14, 2024
1 parent 4aff57f commit 78de2f4
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 78de2f4

Please sign in to comment.