1
0
mirror of https://github.com/matrix-org/matrix-authentication-service.git synced 2025-08-09 04:22:45 +03:00

Bump Clippy to 1.75 and Rust to 1.76

This commit is contained in:
Quentin Gliech
2024-02-27 15:41:59 +01:00
parent 65f164d56d
commit 2c9b8a446d
7 changed files with 14 additions and 12 deletions

View File

@@ -34,7 +34,7 @@ struct Error {
#[tokio::test]
async fn test_http_errors() {
async fn handle<B>(_request: Request<B>) -> Result<Response<String>, Infallible> {
async fn handle<B>(_: Request<B>) -> Result<Response<String>, Infallible> {
let mut res = Response::new(r#"{"error": "invalid_request"}"#.to_owned());
*res.status_mut() = StatusCode::BAD_REQUEST;

View File

@@ -69,7 +69,7 @@ impl Context {
});
let key = translatable
.key
.name
.split('.')
.chain(if translatable.kind == Kind::Plural {
Some("other")
@@ -111,15 +111,15 @@ pub struct Location {
#[derive(Debug, Clone)]
pub struct Key {
kind: Kind,
key: String,
name: String,
location: Option<Location>,
}
impl Key {
pub fn new(kind: Kind, key: String) -> Self {
pub fn new(kind: Kind, name: String) -> Self {
Self {
kind,
key,
name,
location: None,
}
}

View File

@@ -122,7 +122,7 @@ fn find_in_call<'a>(
if var_.id == context.func() {
let key = call
.args
.get(0)
.first()
.and_then(as_const)
.and_then(|const_| const_.value.as_str())
.ok_or(minijinja::Error::new(

View File

@@ -368,6 +368,7 @@ impl RequestClientCredentials {
}
}
#[allow(clippy::struct_field_names)] // All the fields start with `client_`
#[skip_serializing_none]
#[derive(Debug, Clone, PartialEq, Eq, Serialize)]
pub(crate) struct BodyClientCredentials {

View File

@@ -49,6 +49,7 @@ impl<'c> PgBrowserSessionRepository<'c> {
}
}
#[allow(clippy::struct_field_names)]
#[derive(sqlx::FromRow)]
#[sea_query::enum_def]
struct SessionLookup {