Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit fca81fa

Browse files
committed
fix clippy::iter_next_slice: use .get(0) instead of .iter().next()
1 parent 8bc1f91 commit fca81fa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/librustc_middle/traits/query.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ pub struct DropckOutlivesResult<'tcx> {
128128

129129
impl<'tcx> DropckOutlivesResult<'tcx> {
130130
pub fn report_overflows(&self, tcx: TyCtxt<'tcx>, span: Span, ty: Ty<'tcx>) {
131-
if let Some(overflow_ty) = self.overflows.iter().next() {
131+
if let Some(overflow_ty) = self.overflows.get(0) {
132132
let mut err = struct_span_err!(
133133
tcx.sess,
134134
span,

0 commit comments

Comments
 (0)