Skip to content

Commit e776d65

Browse files
committed
Fix Clippy lints introduced by Rust 1.86
1 parent 540400a commit e776d65

File tree

18 files changed

+23
-23
lines changed

18 files changed

+23
-23
lines changed

crates/axum-utils/src/client_authorization.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ impl Credentials {
171171
(_, _) => {
172172
return Err(CredentialsVerificationError::AuthenticationMethodMismatch);
173173
}
174-
};
174+
}
175175
Ok(())
176176
}
177177
}

crates/cli/src/commands/manage.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ impl Options {
386386
0 => info!("No active compatibility sessions to end"),
387387
1 => info!("Ended 1 active OAuth 2.0 session"),
388388
_ => info!("Ended {affected} active OAuth 2.0 sessions"),
389-
};
389+
}
390390

391391
let filter = BrowserSessionFilter::new().for_user(&user).active_only();
392392
let affected = if dry_run {

crates/cli/src/commands/syn2mas.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ impl Options {
130130
.await
131131
.context("could not run migrations")?;
132132

133-
if matches!(&self.subcommand, Subcommand::Migrate { .. }) {
133+
if matches!(&self.subcommand, Subcommand::Migrate) {
134134
// First perform a config sync
135135
// This is crucial to ensure we register upstream OAuth providers
136136
// in the MAS database

crates/email/src/transport.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ impl AsyncTransport for Transport {
144144
TransportInner::Sendmail(t) => {
145145
t.send_raw(envelope, email).await?;
146146
}
147-
};
147+
}
148148

149149
Ok(())
150150
}

crates/handlers/src/admin/response.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,20 +63,20 @@ fn url_with_pagination(base: &str, pagination: Pagination) -> String {
6363
let mut query = query.to_owned();
6464

6565
if let Some(before) = pagination.before {
66-
query += &format!("&page[before]={before}");
66+
query = format!("{query}&page[before]={before}");
6767
}
6868

6969
if let Some(after) = pagination.after {
70-
query += &format!("&page[after]={after}");
70+
query = format!("{query}&page[after]={after}");
7171
}
7272

7373
let count = pagination.count;
7474
match pagination.direction {
7575
mas_storage::pagination::PaginationDirection::Forward => {
76-
query += &format!("&page[first]={count}");
76+
query = format!("{query}&page[first]={count}");
7777
}
7878
mas_storage::pagination::PaginationDirection::Backward => {
79-
query += &format!("&page[last]={count}");
79+
query = format!("{query}&page[last]={count}");
8080
}
8181
}
8282

crates/handlers/src/oauth2/device/link.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ pub(crate) async fn get(
5858

5959
// The code isn't valid, set an error on the form
6060
form_state = form_state.with_error_on_field(DeviceLinkFormField::Code, FieldError::Invalid);
61-
};
61+
}
6262

6363
// Rendre the form
6464
let ctx = DeviceLinkContext::new()

crates/handlers/src/oauth2/token.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ async fn authorization_code_grant(
426426
(Some(pkce), Some(verifier)) => {
427427
pkce.verify(verifier)?;
428428
}
429-
};
429+
}
430430

431431
let Some(user_session_id) = session.user_session_id else {
432432
tracing::warn!("No user session associated with this OAuth2 session");

crates/handlers/src/passwords.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ impl Algorithm {
345345

346346
Pbkdf2.verify_password(password.as_ref(), &hashed_password)?;
347347
}
348-
};
348+
}
349349

350350
Ok(())
351351
}

crates/handlers/src/upstream_oauth2/callback.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ pub(crate) async fn handler(
189189
}
190190

191191
return Err(RouteError::MissingFormParams);
192-
};
192+
}
193193

194194
// The `Form` extractor will use the body of the request for POST requests and
195195
// the query parameters for GET requests. We need to then look at the method do

crates/handlers/src/views/login.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ pub(crate) async fn get(
8585

8686
let reply = query.go_next(&url_builder);
8787
return Ok((cookie_jar, reply).into_response());
88-
};
88+
}
8989

9090
let providers = repo.upstream_oauth_provider().all_enabled().await?;
9191

@@ -98,10 +98,10 @@ pub(crate) async fn get(
9898

9999
if let Some(action) = query.post_auth_action {
100100
destination = destination.and_then(action);
101-
};
101+
}
102102

103103
return Ok((cookie_jar, url_builder.redirect(&destination)).into_response());
104-
};
104+
}
105105

106106
render(
107107
locale,

0 commit comments

Comments
 (0)