Fix new clippy warnings in rust 1.89

This commit is contained in:
René Kijewski 2025-05-16 00:53:46 +02:00
parent 150becaf0f
commit ed216e5b2c
3 changed files with 3 additions and 2 deletions

View File

@ -177,7 +177,7 @@ pub trait Template: fmt::Display + FastWritable {
Ok(()) Ok(())
} else { } else {
let err = wrapped.err.take(); let err = wrapped.err.take();
Err(err.unwrap_or_else(|| io::Error::new(io::ErrorKind::Other, fmt::Error))) Err(err.unwrap_or_else(|| io::Error::other(fmt::Error)))
} }
} }

View File

@ -748,7 +748,7 @@ impl<'a> Generator<'a, '_> {
// We need to normalize the arg to write it, thus we need to add it to // We need to normalize the arg to write it, thus we need to add it to
// locals in the normalized manner // locals in the normalized manner
let normalized_arg = normalize_identifier(arg); let normalized_arg = normalize_identifier(arg);
buf.write(format_args!("let {} = {before}{value}{after};", normalized_arg)); buf.write(format_args!("let {normalized_arg} = {before}{value}{after};"));
this.locals.insert_with_default(Cow::Borrowed(normalized_arg)); this.locals.insert_with_default(Cow::Borrowed(normalized_arg));
} }
} }

View File

@ -8,6 +8,7 @@ use rocket::response::{Redirect, Responder};
use rocket::{Config, Request, Response, catch, catchers, get, routes}; use rocket::{Config, Request, Response, catch, catchers, get, routes};
#[rocket::main] #[rocket::main]
#[allow(clippy::result_large_err)] // needs to be fixed by rocket, not us
async fn main() -> Result<(), Error> { async fn main() -> Result<(), Error> {
env_logger::init_from_env(env_logger::Env::new().default_filter_or("info")); env_logger::init_from_env(env_logger::Env::new().default_filter_or("info"));