Skip to content

Commit

Permalink
Prove Html to template code.
Browse files Browse the repository at this point in the history
  • Loading branch information
kaj committed Oct 3, 2016
1 parent baf643f commit a708099
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ impl Template {
"mod template_{name} {{\n\
use std::io::{{self, Write}};\n\
#[allow(unused)]\n\
use templates::ToHtml;\n\
use ::templates::{{Html,ToHtml}};\n\
{preamble}\n\
pub fn {name}{type_args}(out: &mut Write{args})\n\
-> io::Result<()> {type_spec}{{\n\
{body}\
Ok(())\n\
}}\n\
}}\n\
pub use templates::template_{name}::{name};\n\n",
pub use ::templates::template_{name}::{name};\n\n",
preamble = self.preamble
.iter()
.map(|l| format!("{};\n", l))
Expand Down

0 comments on commit a708099

Please sign in to comment.