Skip to content

Commit

Permalink
Merge pull request #105 from wdv4758h/perf_tweek
Browse files Browse the repository at this point in the history
Save a little clone
  • Loading branch information
Keats authored Dec 30, 2016
2 parents 26299d7 + dcd0199 commit 10bbb00
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/render.rs
Original file line number Diff line number Diff line change
Expand Up @@ -531,10 +531,10 @@ impl<'a> Renderer<'a> {
Some(b) => {
// the indexing here is safe since we are rendering a block, we know we have
// at least 1
match b[0].clone() {
(tpl_name, Block {body, ..}) => {
self.blocks.push((name.clone(), 0));
let has_macro = self.import_macros(tpl_name)?;
match &b[0] {
&(ref tpl_name, Block { ref body, ..}) => {
self.blocks.push((name, 0));
let has_macro = self.import_macros(tpl_name.clone())?;
let res = self.render_node(*body.clone());
if has_macro {
self.macros.pop();
Expand Down

0 comments on commit 10bbb00

Please sign in to comment.