We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ce0ff23 commit 2707164Copy full SHA for 2707164
src/totp.rs
@@ -168,10 +168,7 @@ impl TOTP {
168
/// in seconds.
169
pub fn time_until_refresh_with_start(&self, time: u64, time_start: u64) -> u64 {
170
let time_until = (time - time_start) % self.period;
171
- if time_until == 0 {
172
- return self.period;
173
- }
174
- time_until
+ if time_until == 0 { self.period } else { time_until }
175
}
176
177
0 commit comments