Skip to content

Commit

Permalink
perf: Slight speed up for for-over-hash
Browse files Browse the repository at this point in the history
Design of #203 was quick and dirty.  It was either before the use of
`Cow` or didn't take it into account.

Not seeing room for improvement, sadly.
  • Loading branch information
epage committed Nov 19, 2018
1 parent f739248 commit 8e2ce0e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tags/for_block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ fn get_array(context: &Context, array_id: &Expression) -> Result<Vec<Value>> {
let x = x
.iter()
.map(|(k, v)| {
Value::Array(vec![Value::scalar(k.as_ref().to_owned()), v.to_owned()])
Value::Array(vec![Value::scalar(k.clone()), v.to_owned()])
}).collect();
Ok(x)
}
Expand Down

0 comments on commit 8e2ce0e

Please sign in to comment.