Use is_empty()
This commit is contained in:
parent
9086b17e14
commit
bf08998b5c
@ -54,7 +54,7 @@ fn check_item(&mut self, _: &LateContext<'a, 'tcx>, item: &'tcx Item<'_>) {
|
|||||||
// Remember for each inherent implementation encoutered its span and generics
|
// Remember for each inherent implementation encoutered its span and generics
|
||||||
// but filter out implementations that have generic params (type or lifetime)
|
// but filter out implementations that have generic params (type or lifetime)
|
||||||
// or are derived from a macro
|
// 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);
|
self.impls.insert(item.hir_id.owner_def_id(), item.span);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user