diff --git a/src/json_diff/path.rs b/src/json_diff/path.rs index 256a07e..3945efa 100644 --- a/src/json_diff/path.rs +++ b/src/json_diff/path.rs @@ -118,7 +118,7 @@ impl Path { for segment in jsonpath .trim_matches('$') - .split(|c| c == '.' || c == '[') + .split(['.', '[']) .skip(1) { keys.push(Self::parse_token(segment)?);