improve performance avoid remove & insert to map

This commit is contained in:
Guy Korland 2019-08-11 18:27:37 +03:00 committed by freestrings
parent 15e6c6065b
commit 67991df1f2

View File

@ -1027,11 +1027,15 @@ pub struct SelectorMut {
value: Option<Value>,
}
<<<<<<< HEAD
fn replace_value<F: FnMut(Value) -> Value>(
mut tokens: Vec<String>,
value: &mut Value,
fun: &mut F,
) {
=======
fn replace_value<F: FnMut(Value) -> Value>(mut tokens: Vec<String>, value: &mut Value, fun: &mut F) {
>>>>>>> improve performance avoid remove & insert to map
let mut target = value;
let last_index = tokens.len() - 1;