1
0
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:
Quentin Gliech
2022-12-16 17:51:40 +01:00
parent 5b28c1e6ce
commit ca112d45e1
17 changed files with 25 additions and 25 deletions

View File

@ -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!({

View File

@ -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());
}

View File

@ -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)