From c0d928561c3b88b294ddffaf8f8179f672babcda Mon Sep 17 00:00:00 2001 From: Samuel Moelius Date: Mon, 31 Oct 2022 20:12:37 -0400 Subject: [PATCH] Change two `<=` to `==` for clarity --- clippy_lints/src/lifetimes.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clippy_lints/src/lifetimes.rs b/clippy_lints/src/lifetimes.rs index 36e75d45fd75..be14f6eb6691 100644 --- a/clippy_lints/src/lifetimes.rs +++ b/clippy_lints/src/lifetimes.rs @@ -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