Use is_empty()

This commit is contained in:
Yuki Okushi 2019-12-31 16:50:43 +09:00
parent 9086b17e14
commit bf08998b5c

View file

@ -54,7 +54,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for MultipleInherentImpl {
// Remember for each inherent implementation encoutered its span and generics
// but filter out implementations that have generic params (type or lifetime)
// or are derived from a macro
if !in_macro(item.span) && generics.params.len() == 0 {
if !in_macro(item.span) && generics.params.is_empty() {
self.impls.insert(item.hir_id.owner_def_id(), item.span);
}
}