We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f09a7e4 commit 2a91bb3Copy full SHA for 2a91bb3
crates/handlers/src/upstream_oauth2/link.rs
@@ -697,13 +697,11 @@ pub(crate) async fn post(
697
698
let maybe_user = repo.user().find_by_username(&localpart.unwrap()).await?;
699
700
- if maybe_user.is_none() {
701
- //user can not be None at this stage
+ let Some(user) = maybe_user else {
+ // user cannot be None at this stage
702
return Err(RouteError::InvalidFormAction);
703
}
704
705
- let user = maybe_user.unwrap();
706
-
707
let on_conflict = provider.claims_imports.localpart.on_conflict;
708
709
match on_conflict {
0 commit comments