diff options
author | Dirkjan Ochtman <dirkjan@ochtman.nl> | 2017-03-06 22:20:54 +0100 |
---|---|---|
committer | Dirkjan Ochtman <dirkjan@ochtman.nl> | 2017-03-06 22:20:54 +0100 |
commit | 0efd0c5cc55eb016472947c56e22e7ffe87ed9d4 (patch) | |
tree | 0b7e9870d91639a957bd0a1a0e52a837ef6d650b | |
parent | 90f6acaa6822875abbaee0d85b0af325ee7926f9 (diff) | |
download | askama-0efd0c5cc55eb016472947c56e22e7ffe87ed9d4.tar.gz askama-0efd0c5cc55eb016472947c56e22e7ffe87ed9d4.tar.bz2 askama-0efd0c5cc55eb016472947c56e22e7ffe87ed9d4.zip |
Remove unused TemplateFrom types (fixes #5)
-rw-r--r-- | askama/src/generator.rs | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/askama/src/generator.rs b/askama/src/generator.rs index dcd50e8..16209cd 100644 --- a/askama/src/generator.rs +++ b/askama/src/generator.rs @@ -337,16 +337,6 @@ impl<'a> Generator<'a> { } } - fn path_based_name(&mut self, ast: &syn::DeriveInput, path: &str) { - let encoded = path_as_identifier(path); - let original = ast.ident.as_ref(); - let anno = annotations(&ast.generics); - self.writeln("#[allow(dead_code, non_camel_case_types)]"); - let s = format!("type TemplateFrom{}{} = {}{};", - encoded, &anno, original, &anno); - self.writeln(&s); - } - fn impl_template(&mut self, ast: &syn::DeriveInput, nodes: &'a [Node]) { let anno = annotations(&ast.generics); self.writeln(&format!("impl{} askama::Template for {}{} {{", @@ -444,7 +434,6 @@ pub fn generate(ast: &syn::DeriveInput, path: &str, mut nodes: Vec<Node>) -> Str } let mut gen = Generator::new(); - gen.path_based_name(ast, path); if !blocks.is_empty() { if base.is_none() { gen.define_trait(path, &block_names); |