Skip to content

Commit

Permalink
Fix clippy lints
Browse files Browse the repository at this point in the history
  • Loading branch information
sgued committed Jul 16, 2022
1 parent 34ef464 commit 6851f5a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions clippy_lints/src/iter_once_empty.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use clippy_utils::diagnostics::span_lint_and_sugg;
use clippy_utils::source::snippet;
use rustc_ast::ast::*;
use rustc_ast::ast::{Expr, ExprKind};
use rustc_errors::Applicability;
use rustc_lint::{EarlyContext, EarlyLintPass};
use rustc_session::{declare_lint_pass, declare_tool_lint};
Expand Down Expand Up @@ -157,7 +157,7 @@ impl EarlyLintPass for IterOnceEmpty {
),
_ => return,
};
span_lint_and_sugg(cx, ITER_ONCE, expr.span, msg, "try", sugg, Applicability::Unspecified)
span_lint_and_sugg(cx, ITER_ONCE, expr.span, msg, "try", sugg, Applicability::Unspecified);
} else {
let msg = match method_name {
"iter" => "this .iter call can be replaced with std::iter::empty",
Expand All @@ -174,7 +174,6 @@ impl EarlyLintPass for IterOnceEmpty {
"std::iter::empty()".to_string(),
Applicability::Unspecified,
);
return;
}
}
}

0 comments on commit 6851f5a

Please sign in to comment.