]> git.lizzy.rs Git - rust.git/commitdiff
Make the single char threshold strict inequality
authorMarcin Serwin <toxyxer@gmail.com>
Wed, 15 Apr 2020 11:22:28 +0000 (13:22 +0200)
committerMarcin Serwin <toxyxer@gmail.com>
Wed, 15 Apr 2020 11:35:44 +0000 (13:35 +0200)
clippy_lints/src/non_expressive_names.rs

index 98446eef9d7327c8cabe25d3bea60223d3b73640..45809b359866168f5c5cde87a15d1c4cc749b846 100644 (file)
@@ -93,7 +93,7 @@ impl<'a, 'tcx> SimilarNamesLocalVisitor<'a, 'tcx> {
     fn check_single_char_names(&self) {
         let num_single_char_names = self.single_char_names.iter().flatten().count();
         let threshold = self.lint.single_char_binding_names_threshold;
-        if num_single_char_names as u64 >= threshold {
+        if num_single_char_names as u64 > threshold {
             let span = self
                 .single_char_names
                 .iter()