1
Fork 0

fix clippy::iter_next_slice: use .get(0) instead of .iter().next()

This commit is contained in:
Matthias Krüger 2020-08-01 17:45:08 +02:00
parent 8bc1f91822
commit fca81fa3cd

View file

@ -128,7 +128,7 @@ pub struct DropckOutlivesResult<'tcx> {
impl<'tcx> DropckOutlivesResult<'tcx> {
pub fn report_overflows(&self, tcx: TyCtxt<'tcx>, span: Span, ty: Ty<'tcx>) {
if let Some(overflow_ty) = self.overflows.iter().next() {
if let Some(overflow_ty) = self.overflows.get(0) {
let mut err = struct_span_err!(
tcx.sess,
span,