From 3003d86264680433e789d2726d0d12d2c6267c40 Mon Sep 17 00:00:00 2001 From: Dirkjan Ochtman Date: Mon, 30 Jan 2023 09:51:23 +0100 Subject: Apply clippy suggestions for 1.67 (#769) --- askama_derive/src/input.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'askama_derive/src/input.rs') diff --git a/askama_derive/src/input.rs b/askama_derive/src/input.rs index 68d01db..47d51bd 100644 --- a/askama_derive/src/input.rs +++ b/askama_derive/src/input.rs @@ -42,7 +42,7 @@ impl TemplateInput<'_> { // of `ext` is merged into a synthetic `path` value here. let source = source.expect("template path or source not found in attributes"); let path = match (&source, &ext) { - (&Source::Path(ref path), _) => config.find_template(path, None)?, + (Source::Path(path), _) => config.find_template(path, None)?, (&Source::Source(_), Some(ext)) => PathBuf::from(format!("{}.{}", ast.ident, ext)), (&Source::Source(_), None) => { return Err("must include 'ext' attribute when using 'source' attribute".into()) @@ -56,7 +56,7 @@ impl TemplateInput<'_> { config .syntaxes .get(&s) - .ok_or_else(|| CompileError::from(format!("attribute syntax {} not exist", s))) + .ok_or_else(|| CompileError::from(format!("attribute syntax {s} not exist"))) }, )?; @@ -78,7 +78,7 @@ impl TemplateInput<'_> { } let escaper = escaper.ok_or_else(|| { - CompileError::from(format!("no escaper defined for extension '{}'", escaping)) + CompileError::from(format!("no escaper defined for extension '{escaping}'")) })?; let mime_type = @@ -146,7 +146,7 @@ impl FromStr for Print { "ast" => Ast, "code" => Code, "none" => None, - v => return Err(format!("invalid value for print option: {}", v,).into()), + v => return Err(format!("invalid value for print option: {v}",).into()), }) } } -- cgit