Skip to content

Commit 27d403a

Browse files
committed
get(0) -> first()
1 parent 3b1d5e3 commit 27d403a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/rustc_hir/src/hir.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ pub type UsePath<'hir> = Path<'hir, SmallVec<[Res; 3]>>;
206206

207207
impl Path<'_> {
208208
pub fn is_global(&self) -> bool {
209-
self.segments.get(0).is_some_and(|segment| segment.ident.name == kw::PathRoot)
209+
self.segments.first().is_some_and(|segment| segment.ident.name == kw::PathRoot)
210210
}
211211
}
212212

0 commit comments

Comments
 (0)