Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ jobs:
uses: actions/[email protected]

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@1.85.0
uses: dtolnay/rust-toolchain@1.86.0
with:
components: clippy

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion crates/axum-utils/src/client_authorization.rs
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ impl Credentials {
(_, _) => {
return Err(CredentialsVerificationError::AuthenticationMethodMismatch);
}
};
}
Ok(())
}
}
Expand Down
2 changes: 1 addition & 1 deletion crates/cli/src/commands/manage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion crates/cli/src/commands/syn2mas.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion crates/email/src/transport.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ impl AsyncTransport for Transport {
TransportInner::Sendmail(t) => {
t.send_raw(envelope, email).await?;
}
};
}

Ok(())
}
Expand Down
8 changes: 4 additions & 4 deletions crates/handlers/src/admin/response.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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}");
}
}

Expand Down
2 changes: 1 addition & 1 deletion crates/handlers/src/oauth2/device/link.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion crates/handlers/src/oauth2/token.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
2 changes: 1 addition & 1 deletion crates/handlers/src/passwords.rs
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ impl Algorithm {

Pbkdf2.verify_password(password.as_ref(), &hashed_password)?;
}
};
}

Ok(())
}
Expand Down
2 changes: 1 addition & 1 deletion crates/handlers/src/upstream_oauth2/callback.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions crates/handlers/src/views/login.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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?;

Expand All @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion crates/handlers/src/views/register/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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?;

Expand Down
2 changes: 1 addition & 1 deletion crates/i18n/src/sprintf/formatter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ fn format_value(value: &Value, placeholder: &Placeholder) -> Result<String, Form
} else {
let mut serializer = serde_json::Serializer::new(&mut json);
value.serialize(&mut serializer)?;
};
}
let json = String::from_utf8(json)?;
Ok(format_placeholder!(json, placeholder))
}
Expand Down
2 changes: 1 addition & 1 deletion crates/i18n/src/translations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ impl Tree {
..
} => self.inner = tree.inner,
_ => panic!("Tried to replace the root node"),
};
}

replaced
}
Expand Down
2 changes: 1 addition & 1 deletion crates/storage-pg/src/pagination.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
2 changes: 1 addition & 1 deletion crates/syn2mas/src/synapse_reader/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ impl FullUserId {
expected: expected_server_name.to_owned(),
found: server_name.to_owned(),
});
};
}

Ok(localpart)
}
Expand Down
2 changes: 1 addition & 1 deletion crates/tasks/src/matrix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
2 changes: 1 addition & 1 deletion crates/tasks/src/new_queue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1045,7 +1045,7 @@ impl JobTracker {
);
}
}
};
}

if blocking {
self.last_join_result = self.running_jobs.join_next_with_id().await;
Expand Down
2 changes: 1 addition & 1 deletion crates/templates/src/functions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ fn function_add_params_to_url(
match mode {
Fragment => uri.set_fragment(Some(&params)),
Query => uri.set_query(Some(&params)),
};
}
uri
};

Expand Down
Loading