cargo clippy
This commit is contained in:
@ -38,10 +38,10 @@ impl TotpKey {
|
||||
pub fn url_for_user(&self, u: &User, conf: &AppConfig) -> String {
|
||||
format!(
|
||||
"otpauth://totp/{}:{}?secret={}&issuer={}&algorithm=SHA1&digits={}&period={}",
|
||||
urlencoding::encode(&conf.domain_name()),
|
||||
urlencoding::encode(conf.domain_name()),
|
||||
urlencoding::encode(&u.username),
|
||||
self.encoded,
|
||||
urlencoding::encode(&conf.domain_name()),
|
||||
urlencoding::encode(conf.domain_name()),
|
||||
NUM_DIGITS,
|
||||
PERIOD,
|
||||
)
|
||||
@ -63,7 +63,7 @@ impl TotpKey {
|
||||
|
||||
/// Get current code
|
||||
pub fn current_code(&self) -> Res<String> {
|
||||
self.get_code_at(|| time())
|
||||
self.get_code_at(time)
|
||||
}
|
||||
|
||||
/// Get previous code
|
||||
|
Reference in New Issue
Block a user