Skip to content

Commit

Permalink
fix: lint issue on first()
Browse files Browse the repository at this point in the history
  • Loading branch information
sunng87 committed Oct 25, 2023
1 parent 2e24847 commit 94c84a1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/json/path.rs
Expand Up @@ -72,7 +72,7 @@ impl Path {
}

fn get_local_path_and_level(paths: &[PathSeg]) -> Option<(usize, String)> {
paths.get(0).and_then(|seg| {
paths.first().and_then(|seg| {
if seg == &PathSeg::Ruled(Rule::path_local) {
let mut level = 0;
while paths.get(level + 1)? == &PathSeg::Ruled(Rule::path_up) {
Expand Down

0 comments on commit 94c84a1

Please sign in to comment.