diff options
| author | KunoiSayami <[email protected]> | 2021-11-11 00:27:25 +0800 |
|---|---|---|
| committer | KunoiSayami <[email protected]> | 2021-11-11 00:28:01 +0800 |
| commit | ff968cf5c39652d9153aa3dcf5563e6d83ea0e6c (patch) | |
| tree | 4bf3b31affa531886aed2f73a2950b9e76dc00db /src/main.rs | |
| parent | c64151e929cea76be5553cdeeeaf90de2ca75d89 (diff) | |
fmt(core): Address cargo fmtv4.0.0-alpha.1
* feat(core): Address cargo clippy
* feat(test): Support change PAM provide from environments
Signed-off-by: KunoiSayami <[email protected]>
Diffstat (limited to 'src/main.rs')
| -rw-r--r-- | src/main.rs | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/main.rs b/src/main.rs index 91c4c01..217255e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -211,11 +211,8 @@ async fn cmd_init(cfg: Config) -> Result<()> { } async fn verify_login(cfg: &WrapConfigure, data: &FormData) -> Result<bool> { - match cfg.get_authorizer().method() { - AuthorizerType::PASSWORD => { - cfg.hook().await?; - } - _ => {} + if let AuthorizerType::Password = cfg.get_authorizer().method() { + cfg.hook().await?; } data.authorize(cfg.get_authorizer()).await } |
