diff options
| author | Philipp Hansch <dev@phansch.net> | 2019-04-14 13:37:38 +0200 |
|---|---|---|
| committer | Philipp Hansch <dev@phansch.net> | 2019-04-14 15:07:15 +0200 |
| commit | 289a9af8014806aae79547645e4055f867b0cd09 (patch) | |
| tree | 692a23c2ae088c85596582afe2debd7cea9a8bad | |
| parent | ad27e3ff9b47e7afd2e75f969b42222a830feb8b (diff) | |
| download | rust-289a9af8014806aae79547645e4055f867b0cd09.tar.gz rust-289a9af8014806aae79547645e4055f867b0cd09.zip | |
cargo fmt
| -rw-r--r-- | clippy_lints/src/formatting.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/clippy_lints/src/formatting.rs b/clippy_lints/src/formatting.rs index 7d0266a8731..542392c8b29 100644 --- a/clippy_lints/src/formatting.rs +++ b/clippy_lints/src/formatting.rs @@ -1,9 +1,9 @@ use crate::utils::{differing_macro_contexts, in_macro, snippet_opt, span_note_and_lint}; +use if_chain::if_chain; use rustc::lint::{in_external_macro, EarlyContext, EarlyLintPass, LintArray, LintPass}; use rustc::{declare_tool_lint, lint_array}; use syntax::ast; use syntax::ptr::P; -use if_chain::if_chain; declare_clippy_lint! { /// **What it does:** Checks for use of the non-existent `=*`, `=!` and `=-` @@ -157,8 +157,7 @@ fn check_else(cx: &EarlyContext<'_>, expr: &ast::Expr) { if expr.span.lo().0 != 0 && expr.span.hi().0 != 0; // this will be a span from the closing ‘}’ of the “then” block (excluding) to - // the - // “if” of the “else if” block (excluding) + // the “if” of the “else if” block (excluding) let else_span = then.span.between(else_.span); // the snippet should look like " else \n " with maybe comments anywhere |
