mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-24 07:44:10 +00:00
fix clippy::len_zero: use is_empty() instead of comparing .len() to zero
This commit is contained in:
parent
eccc2fe503
commit
057730c4b1
@ -379,7 +379,7 @@ impl<'tcx> chalk_solve::RustIrDatabase<RustInterner<'tcx>> for RustIrDatabase<'t
|
||||
ty::AdtKind::Struct | ty::AdtKind::Union => None,
|
||||
ty::AdtKind::Enum => {
|
||||
let constraint = self.tcx.adt_sized_constraint(adt_def.did);
|
||||
if constraint.0.len() > 0 { unimplemented!() } else { Some(true) }
|
||||
if !constraint.0.is_empty() { unimplemented!() } else { Some(true) }
|
||||
}
|
||||
},
|
||||
_ => None,
|
||||
@ -398,7 +398,7 @@ impl<'tcx> chalk_solve::RustIrDatabase<RustInterner<'tcx>> for RustIrDatabase<'t
|
||||
ty::AdtKind::Struct | ty::AdtKind::Union => None,
|
||||
ty::AdtKind::Enum => {
|
||||
let constraint = self.tcx.adt_sized_constraint(adt_def.did);
|
||||
if constraint.0.len() > 0 { unimplemented!() } else { Some(true) }
|
||||
if !constraint.0.is_empty() { unimplemented!() } else { Some(true) }
|
||||
}
|
||||
},
|
||||
_ => None,
|
||||
|
Loading…
Reference in New Issue
Block a user