Skip to content

Commit

Permalink
Save a little clone
Browse files Browse the repository at this point in the history
  • Loading branch information
wdv4758h committed Dec 30, 2016
1 parent 26299d7 commit dcd0199
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/render.rs
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 dcd0199

Please sign in to comment.