Skip to content

Commit

Permalink
Merge pull request #413 from evenfurther/first
Browse files Browse the repository at this point in the history
Use slice::first() instead of slice::get(0)
  • Loading branch information
samueltardieu authored Nov 12, 2023
2 parents a664584 + 06b31cd commit 97ba705
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/loaders/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ pub struct Entry {
}

fn common_prefix(entries: &[Entry]) -> Option<String> {
let first = &entries.get(0)?.designator;
let first = &entries.first()?.designator;
for (i, _) in first.rmatch_indices('/') {
let prefix = &first[0..=i];
if entries
Expand Down

0 comments on commit 97ba705

Please sign in to comment.