diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index f1bbc2f85..038a589b8 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -210,7 +210,7 @@ jobs: uses: actions/checkout@v4.2.2 - name: Install Rust toolchain - uses: dtolnay/rust-toolchain@1.85.0 + uses: dtolnay/rust-toolchain@1.86.0 with: components: clippy diff --git a/Dockerfile b/Dockerfile index 6e53f2ea4..085504530 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,7 +8,7 @@ # The Debian version and version name must be in sync ARG DEBIAN_VERSION=12 ARG DEBIAN_VERSION_NAME=bookworm -ARG RUSTC_VERSION=1.85.0 +ARG RUSTC_VERSION=1.86.0 ARG NODEJS_VERSION=20.15.0 ARG OPA_VERSION=1.1.0 ARG CARGO_AUDITABLE_VERSION=0.6.6 diff --git a/crates/axum-utils/src/client_authorization.rs b/crates/axum-utils/src/client_authorization.rs index a259f1286..b3886c7b9 100644 --- a/crates/axum-utils/src/client_authorization.rs +++ b/crates/axum-utils/src/client_authorization.rs @@ -171,7 +171,7 @@ impl Credentials { (_, _) => { return Err(CredentialsVerificationError::AuthenticationMethodMismatch); } - }; + } Ok(()) } } diff --git a/crates/cli/src/commands/manage.rs b/crates/cli/src/commands/manage.rs index da5cb595d..4cf59a483 100644 --- a/crates/cli/src/commands/manage.rs +++ b/crates/cli/src/commands/manage.rs @@ -386,7 +386,7 @@ impl Options { 0 => info!("No active compatibility sessions to end"), 1 => info!("Ended 1 active OAuth 2.0 session"), _ => info!("Ended {affected} active OAuth 2.0 sessions"), - }; + } let filter = BrowserSessionFilter::new().for_user(&user).active_only(); let affected = if dry_run { diff --git a/crates/cli/src/commands/syn2mas.rs b/crates/cli/src/commands/syn2mas.rs index ef3f34e7e..473afed54 100644 --- a/crates/cli/src/commands/syn2mas.rs +++ b/crates/cli/src/commands/syn2mas.rs @@ -130,7 +130,7 @@ impl Options { .await .context("could not run migrations")?; - if matches!(&self.subcommand, Subcommand::Migrate { .. }) { + if matches!(&self.subcommand, Subcommand::Migrate) { // First perform a config sync // This is crucial to ensure we register upstream OAuth providers // in the MAS database diff --git a/crates/email/src/transport.rs b/crates/email/src/transport.rs index 3675b3792..21291a1b1 100644 --- a/crates/email/src/transport.rs +++ b/crates/email/src/transport.rs @@ -144,7 +144,7 @@ impl AsyncTransport for Transport { TransportInner::Sendmail(t) => { t.send_raw(envelope, email).await?; } - }; + } Ok(()) } diff --git a/crates/handlers/src/admin/response.rs b/crates/handlers/src/admin/response.rs index 17e11936f..753260961 100644 --- a/crates/handlers/src/admin/response.rs +++ b/crates/handlers/src/admin/response.rs @@ -63,20 +63,20 @@ fn url_with_pagination(base: &str, pagination: Pagination) -> String { let mut query = query.to_owned(); if let Some(before) = pagination.before { - query += &format!("&page[before]={before}"); + query = format!("{query}&page[before]={before}"); } if let Some(after) = pagination.after { - query += &format!("&page[after]={after}"); + query = format!("{query}&page[after]={after}"); } let count = pagination.count; match pagination.direction { mas_storage::pagination::PaginationDirection::Forward => { - query += &format!("&page[first]={count}"); + query = format!("{query}&page[first]={count}"); } mas_storage::pagination::PaginationDirection::Backward => { - query += &format!("&page[last]={count}"); + query = format!("{query}&page[last]={count}"); } } diff --git a/crates/handlers/src/oauth2/device/link.rs b/crates/handlers/src/oauth2/device/link.rs index 389aa858e..3e734cf1c 100644 --- a/crates/handlers/src/oauth2/device/link.rs +++ b/crates/handlers/src/oauth2/device/link.rs @@ -58,7 +58,7 @@ pub(crate) async fn get( // The code isn't valid, set an error on the form form_state = form_state.with_error_on_field(DeviceLinkFormField::Code, FieldError::Invalid); - }; + } // Rendre the form let ctx = DeviceLinkContext::new() diff --git a/crates/handlers/src/oauth2/token.rs b/crates/handlers/src/oauth2/token.rs index d76c81f1b..d5f65be6c 100644 --- a/crates/handlers/src/oauth2/token.rs +++ b/crates/handlers/src/oauth2/token.rs @@ -426,7 +426,7 @@ async fn authorization_code_grant( (Some(pkce), Some(verifier)) => { pkce.verify(verifier)?; } - }; + } let Some(user_session_id) = session.user_session_id else { tracing::warn!("No user session associated with this OAuth2 session"); diff --git a/crates/handlers/src/passwords.rs b/crates/handlers/src/passwords.rs index a3cd46ff4..a0e36f8e5 100644 --- a/crates/handlers/src/passwords.rs +++ b/crates/handlers/src/passwords.rs @@ -345,7 +345,7 @@ impl Algorithm { Pbkdf2.verify_password(password.as_ref(), &hashed_password)?; } - }; + } Ok(()) } diff --git a/crates/handlers/src/upstream_oauth2/callback.rs b/crates/handlers/src/upstream_oauth2/callback.rs index b0421c33d..9556fd3af 100644 --- a/crates/handlers/src/upstream_oauth2/callback.rs +++ b/crates/handlers/src/upstream_oauth2/callback.rs @@ -189,7 +189,7 @@ pub(crate) async fn handler( } return Err(RouteError::MissingFormParams); - }; + } // The `Form` extractor will use the body of the request for POST requests and // the query parameters for GET requests. We need to then look at the method do diff --git a/crates/handlers/src/views/login.rs b/crates/handlers/src/views/login.rs index 292b3ff66..67256c92e 100644 --- a/crates/handlers/src/views/login.rs +++ b/crates/handlers/src/views/login.rs @@ -85,7 +85,7 @@ pub(crate) async fn get( let reply = query.go_next(&url_builder); return Ok((cookie_jar, reply).into_response()); - }; + } let providers = repo.upstream_oauth_provider().all_enabled().await?; @@ -98,10 +98,10 @@ pub(crate) async fn get( if let Some(action) = query.post_auth_action { destination = destination.and_then(action); - }; + } return Ok((cookie_jar, url_builder.redirect(&destination)).into_response()); - }; + } render( locale, diff --git a/crates/handlers/src/views/register/mod.rs b/crates/handlers/src/views/register/mod.rs index 7a497f3c0..9afe22474 100644 --- a/crates/handlers/src/views/register/mod.rs +++ b/crates/handlers/src/views/register/mod.rs @@ -45,7 +45,7 @@ pub(crate) async fn get( let reply = query.go_next(&url_builder); return Ok((cookie_jar, reply).into_response()); - }; + } let providers = repo.upstream_oauth_provider().all_enabled().await?; diff --git a/crates/i18n/src/sprintf/formatter.rs b/crates/i18n/src/sprintf/formatter.rs index 36388361c..a0846e46f 100644 --- a/crates/i18n/src/sprintf/formatter.rs +++ b/crates/i18n/src/sprintf/formatter.rs @@ -469,7 +469,7 @@ fn format_value(value: &Value, placeholder: &Placeholder) -> Result self.inner = tree.inner, _ => panic!("Tried to replace the root node"), - }; + } replaced } diff --git a/crates/storage-pg/src/pagination.rs b/crates/storage-pg/src/pagination.rs index c4c8317f1..34f317a73 100644 --- a/crates/storage-pg/src/pagination.rs +++ b/crates/storage-pg/src/pagination.rs @@ -58,7 +58,7 @@ impl QueryBuilderExt for sea_query::SelectStatement { self.order_by(id_field, sea_query::Order::Desc) .limit((pagination.count + 1) as u64); } - }; + } self } diff --git a/crates/syn2mas/src/synapse_reader/mod.rs b/crates/syn2mas/src/synapse_reader/mod.rs index c2973a905..0b753e33b 100644 --- a/crates/syn2mas/src/synapse_reader/mod.rs +++ b/crates/syn2mas/src/synapse_reader/mod.rs @@ -82,7 +82,7 @@ impl FullUserId { expected: expected_server_name.to_owned(), found: server_name.to_owned(), }); - }; + } Ok(localpart) } diff --git a/crates/tasks/src/matrix.rs b/crates/tasks/src/matrix.rs index 047666f81..d65152198 100644 --- a/crates/tasks/src/matrix.rs +++ b/crates/tasks/src/matrix.rs @@ -209,7 +209,7 @@ impl RunnableJob for SyncDevicesJob { for (compat_session, _) in page.edges { if let Some(ref device) = compat_session.device { devices.insert(device.as_str().to_owned()); - }; + } cursor = cursor.after(compat_session.id); } diff --git a/crates/tasks/src/new_queue.rs b/crates/tasks/src/new_queue.rs index 4d42ef67e..b78d9014a 100644 --- a/crates/tasks/src/new_queue.rs +++ b/crates/tasks/src/new_queue.rs @@ -1045,7 +1045,7 @@ impl JobTracker { ); } } - }; + } if blocking { self.last_join_result = self.running_jobs.join_next_with_id().await; diff --git a/crates/templates/src/functions.rs b/crates/templates/src/functions.rs index 5c2cc8bb4..edda9783a 100644 --- a/crates/templates/src/functions.rs +++ b/crates/templates/src/functions.rs @@ -191,7 +191,7 @@ fn function_add_params_to_url( match mode { Fragment => uri.set_fragment(Some(¶ms)), Query => uri.set_query(Some(¶ms)), - }; + } uri };