Skip to content

Commit 335bc1e

Browse files
Fix some more stutter warnings
1 parent 73ba33d commit 335bc1e

File tree

3 files changed

+10
-12
lines changed

3 files changed

+10
-12
lines changed

clippy_lints/src/double_comparison.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,16 +40,15 @@ declare_clippy_lint! {
4040
"unnecessary double comparisons that can be simplified"
4141
}
4242

43-
#[allow(clippy::stutter)]
44-
pub struct DoubleComparisonPass;
43+
pub struct Pass;
4544

46-
impl LintPass for DoubleComparisonPass {
45+
impl LintPass for Pass {
4746
fn get_lints(&self) -> LintArray {
4847
lint_array!(DOUBLE_COMPARISONS)
4948
}
5049
}
5150

52-
impl<'a, 'tcx> DoubleComparisonPass {
51+
impl<'a, 'tcx> Pass {
5352
#[allow(clippy::similar_names)]
5453
fn check_binop(
5554
&self,
@@ -89,7 +88,7 @@ impl<'a, 'tcx> DoubleComparisonPass {
8988
}
9089
}
9190

92-
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for DoubleComparisonPass {
91+
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass {
9392
fn check_expr(&mut self, cx: &LateContext<'a, 'tcx>, expr: &'tcx Expr) {
9493
if let ExprKind::Binary(ref kind, ref lhs, ref rhs) = expr.node {
9594
self.check_binop(cx, kind.node, lhs, rhs, expr.span);

clippy_lints/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -428,8 +428,8 @@ pub fn register_plugins(reg: &mut rustc_plugin::Registry<'_>, conf: &Conf) {
428428
reg.register_late_lint_pass(box fallible_impl_from::FallibleImplFrom);
429429
reg.register_late_lint_pass(box replace_consts::ReplaceConsts);
430430
reg.register_late_lint_pass(box types::UnitArg);
431-
reg.register_late_lint_pass(box double_comparison::DoubleComparisonPass);
432-
reg.register_late_lint_pass(box question_mark::QuestionMarkPass);
431+
reg.register_late_lint_pass(box double_comparison::Pass);
432+
reg.register_late_lint_pass(box question_mark::Pass);
433433
reg.register_late_lint_pass(box suspicious_trait_impl::SuspiciousImpl);
434434
reg.register_early_lint_pass(box multiple_crate_versions::Pass);
435435
reg.register_late_lint_pass(box map_unit_fn::Pass);

clippy_lints/src/question_mark.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,17 +44,16 @@ declare_clippy_lint!{
4444
"checks for expressions that could be replaced by the question mark operator"
4545
}
4646

47-
#[allow(clippy::stutter)]
4847
#[derive(Copy, Clone)]
49-
pub struct QuestionMarkPass;
48+
pub struct Pass;
5049

51-
impl LintPass for QuestionMarkPass {
50+
impl LintPass for Pass {
5251
fn get_lints(&self) -> LintArray {
5352
lint_array!(QUESTION_MARK)
5453
}
5554
}
5655

57-
impl QuestionMarkPass {
56+
impl Pass {
5857
/// Check if the given expression on the given context matches the following structure:
5958
///
6059
/// ```ignore
@@ -146,7 +145,7 @@ impl QuestionMarkPass {
146145
}
147146
}
148147

149-
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for QuestionMarkPass {
148+
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass {
150149
fn check_expr(&mut self, cx: &LateContext<'a, 'tcx>, expr: &'tcx Expr) {
151150
Self::check_is_none_and_early_return_none(cx, expr);
152151
}

0 commit comments

Comments
 (0)