Skip to content

Commit 5d6295b

Browse files
odelcroisandhose
andcommitted
fix code style
Co-authored-by: Quentin Gliech <[email protected]>
1 parent 3039108 commit 5d6295b

File tree

1 file changed

+2
-4
lines changed
  • crates/handlers/src/upstream_oauth2

1 file changed

+2
-4
lines changed

crates/handlers/src/upstream_oauth2/link.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -697,13 +697,11 @@ pub(crate) async fn post(
697697

698698
let maybe_user = repo.user().find_by_username(&localpart.unwrap()).await?;
699699

700-
if maybe_user.is_none() {
701-
//user can not be None at this stage
700+
let Some(user) = maybe_user else {
701+
// user cannot be None at this stage
702702
return Err(RouteError::InvalidFormAction);
703703
}
704704

705-
let user = maybe_user.unwrap();
706-
707705
let on_conflict = provider.claims_imports.localpart.on_conflict;
708706

709707
match on_conflict {

0 commit comments

Comments
 (0)