Skip to content

Commit e3c866d

Browse files
authored
Upgrade Rust to 1.86.0 (#4355)
2 parents 7080e01 + f9cd7e6 commit e3c866d

File tree

20 files changed

+25
-25
lines changed

20 files changed

+25
-25
lines changed

.github/workflows/ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ jobs:
210210
uses: actions/checkout@v4.2.2
211211

212212
- name: Install Rust toolchain
213-
uses: dtolnay/rust-toolchain@1.85.0
213+
uses: dtolnay/rust-toolchain@1.86.0
214214
with:
215215
components: clippy
216216

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# The Debian version and version name must be in sync
99
ARG DEBIAN_VERSION=12
1010
ARG DEBIAN_VERSION_NAME=bookworm
11-
ARG RUSTC_VERSION=1.85.0
11+
ARG RUSTC_VERSION=1.86.0
1212
ARG NODEJS_VERSION=20.15.0
1313
ARG OPA_VERSION=1.1.0
1414
ARG CARGO_AUDITABLE_VERSION=0.6.6

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,

crates/handlers/src/views/register/mod.rs

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

4646
let reply = query.go_next(&url_builder);
4747
return Ok((cookie_jar, reply).into_response());
48-
};
48+
}
4949

5050
let providers = repo.upstream_oauth_provider().all_enabled().await?;
5151

crates/i18n/src/sprintf/formatter.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,7 @@ fn format_value(value: &Value, placeholder: &Placeholder) -> Result<String, Form
469469
} else {
470470
let mut serializer = serde_json::Serializer::new(&mut json);
471471
value.serialize(&mut serializer)?;
472-
};
472+
}
473473
let json = String::from_utf8(json)?;
474474
Ok(format_placeholder!(json, placeholder))
475475
}

crates/i18n/src/translations.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ impl Tree {
257257
..
258258
} => self.inner = tree.inner,
259259
_ => panic!("Tried to replace the root node"),
260-
};
260+
}
261261

262262
replaced
263263
}

crates/storage-pg/src/pagination.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ impl QueryBuilderExt for sea_query::SelectStatement {
5858
self.order_by(id_field, sea_query::Order::Desc)
5959
.limit((pagination.count + 1) as u64);
6060
}
61-
};
61+
}
6262

6363
self
6464
}

crates/syn2mas/src/synapse_reader/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ impl FullUserId {
8282
expected: expected_server_name.to_owned(),
8383
found: server_name.to_owned(),
8484
});
85-
};
85+
}
8686

8787
Ok(localpart)
8888
}

crates/tasks/src/matrix.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ impl RunnableJob for SyncDevicesJob {
209209
for (compat_session, _) in page.edges {
210210
if let Some(ref device) = compat_session.device {
211211
devices.insert(device.as_str().to_owned());
212-
};
212+
}
213213
cursor = cursor.after(compat_session.id);
214214
}
215215

crates/tasks/src/new_queue.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1045,7 +1045,7 @@ impl JobTracker {
10451045
);
10461046
}
10471047
}
1048-
};
1048+
}
10491049

10501050
if blocking {
10511051
self.last_join_result = self.running_jobs.join_next_with_id().await;

crates/templates/src/functions.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ fn function_add_params_to_url(
191191
match mode {
192192
Fragment => uri.set_fragment(Some(&params)),
193193
Query => uri.set_query(Some(&params)),
194-
};
194+
}
195195
uri
196196
};
197197

0 commit comments

Comments
 (0)