From 8afa4d9aec0a9c9321eff4e90db99ab576b7f2a9 Mon Sep 17 00:00:00 2001 From: Dirkjan Ochtman Date: Mon, 25 Dec 2017 12:30:10 +0100 Subject: Make generated traits public for use in other modules (fixes #61) --- askama_shared/src/generator.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'askama_shared/src') diff --git a/askama_shared/src/generator.rs b/askama_shared/src/generator.rs index 63ebeb3..a1b090d 100644 --- a/askama_shared/src/generator.rs +++ b/askama_shared/src/generator.rs @@ -234,7 +234,7 @@ impl<'a> Generator<'a> { // Defines the `TraitFromPathName` trait. fn define_trait(&mut self, state: &'a State) { - self.writeln(&format!("trait {} {{", state.trait_name)); + self.writeln(&format!("pub trait {} {{", state.trait_name)); self.write_block_defs(state); self.writeln(&format!( "fn render_trait_into(&self, timpl: &{}, writer: &mut ::std::fmt::Write) \ -- cgit