mirror of
https://github.com/askama-rs/askama.git
synced 2025-09-28 13:30:59 +00:00
Fix new clippy warnings in rust 1.89
This commit is contained in:
parent
150becaf0f
commit
ed216e5b2c
@ -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)))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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"));
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user