Skip to content

Commit

Permalink
Change two <= to == for clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
smoelius committed Nov 1, 2022
1 parent 2c44398 commit c0d9285
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion clippy_lints/src/lifetimes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ fn could_use_elision<'tcx>(
let elidable_lts = named_lifetime_occurrences(&input_lts)
.into_iter()
.filter_map(|(def_id, occurrences)| {
if occurrences <= 1 && (input_lts.len() <= 1 || !output_lts.contains(&RefLt::Named(def_id))) {
if occurrences == 1 && (input_lts.len() == 1 || !output_lts.contains(&RefLt::Named(def_id))) {
Some((
def_id,
input_visitor
Expand Down

0 comments on commit c0d9285

Please sign in to comment.