You've already forked authentication-service
mirror of
https://github.com/matrix-org/matrix-authentication-service.git
synced 2025-07-29 22:01:14 +03:00
ci: Update clippy to 1.66 and fix new warnings
This commit is contained in:
@ -208,7 +208,7 @@ mod tests {
|
||||
};
|
||||
|
||||
let state = form.to_form_state();
|
||||
let state = serde_json::to_value(&state).unwrap();
|
||||
let state = serde_json::to_value(state).unwrap();
|
||||
assert_eq!(
|
||||
state,
|
||||
serde_json::json!({
|
||||
@ -236,7 +236,7 @@ mod tests {
|
||||
.with_error_on_field(TestFormField::Bar, FieldError::Required)
|
||||
.with_error_on_form(FormError::InvalidCredentials);
|
||||
|
||||
let state = serde_json::to_value(&state).unwrap();
|
||||
let state = serde_json::to_value(state).unwrap();
|
||||
assert_eq!(
|
||||
state,
|
||||
serde_json::json!({
|
||||
|
@ -132,7 +132,7 @@ fn function_merge(params: &HashMap<String, Value>) -> Result<Value, tera::Error>
|
||||
for (k, v) in params {
|
||||
let v = v
|
||||
.as_object()
|
||||
.ok_or_else(|| tera::Error::msg(format!("Parameter {:?} should be an object", k)))?;
|
||||
.ok_or_else(|| tera::Error::msg(format!("Parameter {k:?} should be an object")))?;
|
||||
ret.extend(v.clone());
|
||||
}
|
||||
|
||||
|
@ -114,7 +114,7 @@ impl Templates {
|
||||
// This uses blocking I/Os, do that in a blocking task
|
||||
let mut tera = tokio::task::spawn_blocking(move || {
|
||||
let path = path.canonicalize_utf8()?;
|
||||
let path = format!("{}/**/*.{{html,txt,subject}}", path);
|
||||
let path = format!("{path}/**/*.{{html,txt,subject}}");
|
||||
|
||||
info!(%path, "Loading templates from filesystem");
|
||||
Tera::new(&path)
|
||||
|
Reference in New Issue
Block a user