mirror of
https://github.com/fluencelabs/jsonpath
synced 2025-06-11 07:01:28 +00:00
fix clippy error
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user