Rust Edition 2024
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
2025-03-28 14:40:35 +01:00
parent 19f99cf9b9
commit b77e7895b7
26 changed files with 102 additions and 60 deletions

View File

@ -80,7 +80,7 @@ impl TotpKey {
/// Get the code at a specific time
fn get_code_at<F: Fn() -> u64>(&self, get_time: F) -> Res<String> {
let gen = TotpGenerator::new()
let generator = TotpGenerator::new()
.set_digit(NUM_DIGITS)
.unwrap()
.set_step(PERIOD)
@ -98,7 +98,7 @@ impl TotpKey {
Some(k) => k,
};
Ok(gen.get_code_with(&key, get_time))
Ok(generator.get_code_with(&key, get_time))
}
/// Check a code's validity