setup_greeter: convert unwraps to expects with messages

This commit is contained in:
2022-10-20 19:19:56 -07:00
parent ce4a58c82b
commit 4333ea81a5

View File

@@ -180,11 +180,11 @@ impl Handler {
let handler_borrowed = handler_auth_clone.borrow();
if greeter.get_is_authenticated() {
greeter
.start_session_sync(Some(&handler_borrowed.session.clone().unwrap()))
.start_session_sync(Some(&handler_borrowed.session.clone().expect("auth handler.session is None")))
.ok();
} else {
greeter
.authenticate(Some(&handler_borrowed.user.clone().unwrap()))
.authenticate(Some(&handler_borrowed.user.clone().expect("auth handler.user is None")))
.ok();
}
});