aboutsummaryrefslogtreecommitdiffstats
path: root/askama_derive/src/input.rs
diff options
context:
space:
mode:
authorLibravatar Dirkjan Ochtman <dirkjan@ochtman.nl>2023-01-30 09:51:23 +0100
committerLibravatar GitHub <noreply@github.com>2023-01-30 09:51:23 +0100
commit3003d86264680433e789d2726d0d12d2c6267c40 (patch)
treec7e74c13df73d05ec75ee8feec6416733e1de141 /askama_derive/src/input.rs
parent23326b4765b04cb13dd6c72f2103ff9bd6d44d7d (diff)
downloadaskama-3003d86264680433e789d2726d0d12d2c6267c40.tar.gz
askama-3003d86264680433e789d2726d0d12d2c6267c40.tar.bz2
askama-3003d86264680433e789d2726d0d12d2c6267c40.zip
Apply clippy suggestions for 1.67 (#769)
Diffstat (limited to 'askama_derive/src/input.rs')
-rw-r--r--askama_derive/src/input.rs8
1 files changed, 4 insertions, 4 deletions
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()),
})
}
}