mirror of
https://github.com/fluencelabs/jsonpath
synced 2025-04-25 09:22:19 +00:00
fix clippy error
This commit is contained in:
parent
c2a6f3b319
commit
3b4d2b4ffc
@ -1096,7 +1096,7 @@ fn replace_value<F: FnMut(Value) -> Option<Value>>(
|
||||
) {
|
||||
let mut target = value;
|
||||
|
||||
let last_index = tokens.len().checked_sub(1).unwrap_or(0);
|
||||
let last_index = tokens.len().saturating_sub(1);
|
||||
for (i, token) in tokens.drain(..).enumerate() {
|
||||
let target_once = target;
|
||||
let is_last = i == last_index;
|
||||
|
Loading…
x
Reference in New Issue
Block a user