Skip to content

Commit

Permalink
Use is_empty()
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnTitor committed Dec 31, 2019
1 parent 9086b17 commit bf08998
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion clippy_lints/src/inherent_impl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down

0 comments on commit bf08998

Please sign in to comment.