diff --git a/src/loaders/mod.rs b/src/loaders/mod.rs index 0d89b6d0b..108fd49d5 100644 --- a/src/loaders/mod.rs +++ b/src/loaders/mod.rs @@ -5,7 +5,7 @@ pub struct Entry { } fn common_prefix(entries: &[Entry]) -> Option { - let first = &entries.get(0)?.designator; + let first = &entries.first()?.designator; for (i, _) in first.rmatch_indices('/') { let prefix = &first[0..=i]; if entries