1
0
mirror of https://github.com/matrix-org/matrix-authentication-service.git synced 2025-11-20 12:02:22 +03:00

Fix clippy errors

This commit is contained in:
Quentin Gliech
2023-03-14 10:28:24 +01:00
parent c6f31d0102
commit 83cb9158a0
6 changed files with 7 additions and 16 deletions

View File

@@ -103,6 +103,9 @@ impl UpstreamOAuth2Link {
} else {
// Fetch on-the-fly
let mut repo = ctx.data::<Mutex<BoxRepository>>()?.lock().await;
// This is a false positive, since it would have a lifetime error
#[allow(clippy::let_and_return)]
let provider = repo
.upstream_oauth_provider()
.lookup(self.link.provider_id)
@@ -122,6 +125,9 @@ impl UpstreamOAuth2Link {
} else if let Some(user_id) = &self.link.user_id {
// Fetch on-the-fly
let mut repo = ctx.data::<Mutex<BoxRepository>>()?.lock().await;
// This is a false positive, since it would have a lifetime error
#[allow(clippy::let_and_return)]
let user = repo
.user()
.lookup(*user_id)