diff options
author | René Kijewski <kijewski@library.vetmed.fu-berlin.de> | 2022-01-07 01:06:14 +0100 |
---|---|---|
committer | Dirkjan Ochtman <dirkjan@ochtman.nl> | 2022-01-07 13:18:03 +0100 |
commit | eff10b74567881eef73868f3e3391c6a0e922375 (patch) | |
tree | 52fb1cc09145d29e185ccf8403e8b1db24bb7094 /askama_shared/src/input.rs | |
parent | e3ede6a71ed96cfe78c2883a2fac1d0f9425b668 (diff) | |
download | askama-eff10b74567881eef73868f3e3391c6a0e922375.tar.gz askama-eff10b74567881eef73868f3e3391c6a0e922375.tar.bz2 askama-eff10b74567881eef73868f3e3391c6a0e922375.zip |
Unshadow function escaping()
Diffstat (limited to 'askama_shared/src/input.rs')
-rw-r--r-- | askama_shared/src/input.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/askama_shared/src/input.rs b/askama_shared/src/input.rs index 7d28a7e..25d61e1 100644 --- a/askama_shared/src/input.rs +++ b/askama_shared/src/input.rs @@ -161,7 +161,7 @@ impl TemplateInput<'_> { // Match extension against defined output formats - let extension = escaping.unwrap_or_else(|| { + let escaping = escaping.unwrap_or_else(|| { path.extension() .map(|s| s.to_str().unwrap()) .unwrap_or("") @@ -170,14 +170,14 @@ impl TemplateInput<'_> { let mut escaper = None; for (extensions, path) in &config.escapers { - if extensions.contains(&extension) { + if extensions.contains(&escaping) { escaper = Some(path); break; } } let escaper = escaper.ok_or_else(|| { - CompileError::String(format!("no escaper defined for extension '{}'", extension,)) + CompileError::String(format!("no escaper defined for extension '{}'", escaping,)) })?; Ok(TemplateInput { |