aboutsummaryrefslogtreecommitdiffstats
path: root/askama_derive/src/generator.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--askama_derive/src/generator.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/askama_derive/src/generator.rs b/askama_derive/src/generator.rs
index 2eed03f..6f75318 100644
--- a/askama_derive/src/generator.rs
+++ b/askama_derive/src/generator.rs
@@ -346,8 +346,8 @@ impl<'a> Generator<'a> {
let mut where_clause = Tokens::new();
ast.generics.where_clause.to_tokens(&mut where_clause);
- let name = if trait_suffix.is_some() {
- format!("TraitFrom{}", trait_suffix.unwrap())
+ let name = if let Some(suffix) = trait_suffix {
+ format!("TraitFrom{}", suffix)
} else {
"askama::Template".to_string()
};