From c8623fd62b42a3cc05c1e76ed146750d4d5e0968 Mon Sep 17 00:00:00 2001 From: Nadja Reitzenstein Date: Wed, 2 Mar 2022 17:28:41 +0100 Subject: [PATCH] Fixes warnings --- src/api/auth.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/api/auth.rs b/src/api/auth.rs index e6c6590..662d3d5 100644 --- a/src/api/auth.rs +++ b/src/api/auth.rs @@ -58,7 +58,7 @@ impl Callback for CB { let pass = session.get_property::() .ok_or(SessionError::no_property::())?; - if let Some(opt) = self.userdb.login(authid.as_ref(), pass.as_bytes()).unwrap() { + if self.userdb.login(authid.as_ref(), pass.as_bytes()).unwrap().is_some() { return Ok(()) } @@ -190,7 +190,7 @@ impl authentication_system::Server for Auth { let mut outcome = pry!(res.get().get_response()).init_outcome(); outcome.reborrow().set_result(response::Result::Successful); - if let Some(data) = b { + if b.is_some() { outcome.init_additional_data().set_additional(&out.get_ref()); } Promise::ok(())