From ff968cf5c39652d9153aa3dcf5563e6d83ea0e6c Mon Sep 17 00:00:00 2001 From: KunoiSayami Date: Thu, 11 Nov 2021 00:27:25 +0800 Subject: fmt(core): Address cargo fmt * feat(core): Address cargo clippy * feat(test): Support change PAM provide from environments Signed-off-by: KunoiSayami --- src/main.rs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/main.rs') 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 { - 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 } -- cgit v1.3.1