remove unneeded returns

Fixes the clippy warning:

warning: unneeded `return` statement
   --> proxmox-tfa/src/api/mod.rs:468:17
    |
468 | /                 return TfaResult::Failure {
469 | |                     needs_saving: true,
470 | |                     tfa_limit_reached,
471 | |                     totp_limit_reached,
472 | |                 };
    | |_________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
    = note: `#[warn(clippy::needless_return)]` on by default
help: remove `return`
    |
468 ~                 TfaResult::Failure {
469 +                     needs_saving: true,
470 +                     tfa_limit_reached,
471 +                     totp_limit_reached,
472 ~                 }
    |

Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
This commit is contained in:
Maximiliano Sandoval 2024-06-26 14:43:37 +02:00 committed by Wolfgang Bumiller
parent d07a0243f4
commit a87d52dad3
3 changed files with 4 additions and 4 deletions

View File

@ -101,7 +101,7 @@ impl Context for PBSContext {
}
fn default_config(&self) -> &'static str {
return DEFAULT_CONFIG;
DEFAULT_CONFIG
}
fn lookup_template(

View File

@ -51,7 +51,7 @@ impl Context for PVEContext {
}
fn default_config(&self) -> &'static str {
return DEFAULT_CONFIG;
DEFAULT_CONFIG
}
fn lookup_template(

View File

@ -465,11 +465,11 @@ impl TfaConfig {
Some(proxmox_time::epoch_i64() + access.tfa_failure_lock_time());
}
return TfaResult::Failure {
TfaResult::Failure {
needs_saving: true,
tfa_limit_reached,
totp_limit_reached,
};
}
}
}
}