setup_greeter: convert `unwrap`s to `expect`s with messages

This commit is contained in:
colin 2022-10-20 19:19:56 -07:00
parent ce4a58c82b
commit 4333ea81a5
1 changed files with 2 additions and 2 deletions

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();
}
});