setup_greeter: convert unwrap
s to expect
s with messages
This commit is contained in:
@@ -180,11 +180,11 @@ impl Handler {
|
|||||||
let handler_borrowed = handler_auth_clone.borrow();
|
let handler_borrowed = handler_auth_clone.borrow();
|
||||||
if greeter.get_is_authenticated() {
|
if greeter.get_is_authenticated() {
|
||||||
greeter
|
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();
|
.ok();
|
||||||
} else {
|
} else {
|
||||||
greeter
|
greeter
|
||||||
.authenticate(Some(&handler_borrowed.user.clone().unwrap()))
|
.authenticate(Some(&handler_borrowed.user.clone().expect("auth handler.user is None")))
|
||||||
.ok();
|
.ok();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user