Skip to content

Commit

Permalink
run cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
Urcra committed Oct 26, 2020
1 parent 4cf5b5f commit 4532dd9
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions clippy_lints/src/len_zero.rs
Expand Up @@ -105,7 +105,6 @@ declare_clippy_lint! {
"checking `x == \"\"` or `x == []` (or similar) when `.is_empty()` could be used instead"
}


declare_lint_pass!(LenZero => [LEN_ZERO, LEN_WITHOUT_IS_EMPTY, COMPARISON_TO_EMPTY]);

impl<'tcx> LateLintPass<'tcx> for LenZero {
Expand Down Expand Up @@ -298,13 +297,7 @@ fn check_len(
}
}

fn check_empty_expr(
cx: &LateContext<'_>,
span: Span,
lit1: &Expr<'_>,
lit2: &Expr<'_>,
op: &str
) {
fn check_empty_expr(cx: &LateContext<'_>, span: Span, lit1: &Expr<'_>, lit2: &Expr<'_>, op: &str) {
if (is_empty_array(lit2) || is_empty_string(lit2)) && has_is_empty(cx, lit1) {
let mut applicability = Applicability::MachineApplicable;
span_lint_and_sugg(
Expand Down

0 comments on commit 4532dd9

Please sign in to comment.