aboutsummaryrefslogtreecommitdiffstats
path: root/askama_derive/src/config.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/config.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/config.rs')
-rw-r--r--askama_derive/src/config.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/askama_derive/src/config.rs b/askama_derive/src/config.rs
index cb0126c..8c49217 100644
--- a/askama_derive/src/config.rs
+++ b/askama_derive/src/config.rs
@@ -1,5 +1,4 @@
use std::collections::{BTreeMap, HashSet};
-use std::convert::TryFrom;
use std::path::{Path, PathBuf};
use std::{env, fs};
@@ -58,13 +57,13 @@ impl Config<'_> {
.insert(name.to_string(), Syntax::try_from(raw_s)?)
.is_some()
{
- return Err(format!("syntax \"{}\" is already defined", name).into());
+ return Err(format!("syntax \"{name}\" is already defined").into());
}
}
}
if !syntaxes.contains_key(default_syntax) {
- return Err(format!("default syntax \"{}\" not found", default_syntax).into());
+ return Err(format!("default syntax \"{default_syntax}\" not found").into());
}
let mut escapers = Vec::new();
@@ -193,7 +192,7 @@ struct RawConfig<'d> {
impl RawConfig<'_> {
#[cfg(feature = "config")]
fn from_toml_str(s: &str) -> std::result::Result<RawConfig<'_>, CompileError> {
- toml::from_str(s).map_err(|e| format!("invalid TOML in {}: {}", CONFIG_FILE_NAME, e).into())
+ toml::from_str(s).map_err(|e| format!("invalid TOML in {CONFIG_FILE_NAME}: {e}").into())
}
#[cfg(not(feature = "config"))]