mirror of
https://github.com/circify/circ.git
synced 2026-01-09 13:48:02 -05:00
Access array without it cloning it. (#160)
All credits to Evan for finding this. Co-authored-by: Evan Laufer <evan.m.laufer@gmail.com>
This commit is contained in:
@@ -1511,7 +1511,7 @@ pub fn eval_op(op: &Op, args: &[&Value], var_vals: &FxHashMap<String, Value>) ->
|
||||
args.iter().cloned().cloned().collect(),
|
||||
)),
|
||||
Op::Select => {
|
||||
let a = args[0].as_array().clone();
|
||||
let a = args[0].as_array();
|
||||
let i = args[1];
|
||||
a.select(i)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user