You've already forked authentication-service
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:
@@ -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;
|
||||
|
||||
|
@@ -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,
|
||||
}
|
||||
}
|
||||
|
@@ -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(
|
||||
|
@@ -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 {
|
||||
|
@@ -49,6 +49,7 @@ impl<'c> PgBrowserSessionRepository<'c> {
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(clippy::struct_field_names)]
|
||||
#[derive(sqlx::FromRow)]
|
||||
#[sea_query::enum_def]
|
||||
struct SessionLookup {
|
||||
|
Reference in New Issue
Block a user