Skip to content

Commit

Permalink
nits
Browse files Browse the repository at this point in the history
  • Loading branch information
nyurik committed Oct 1, 2024
1 parent 500cff6 commit 08b7bd7
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 52 deletions.
6 changes: 3 additions & 3 deletions clippy_lints/src/manual_ignore_case_cmp.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::manual_ignore_case_cmp::MatchType::{Literal, ToAscii};
use clippy_utils::diagnostics::span_lint_and_then;
use clippy_utils::source::snippet;
use clippy_utils::source::snippet_with_applicability;
use clippy_utils::ty::{get_type_diagnostic_name, is_type_diagnostic_item, is_type_lang_item};
use rustc_ast::LitKind;
use rustc_errors::Applicability;
Expand Down Expand Up @@ -54,7 +54,7 @@ fn get_ascii_type<'a, 'b>(cx: &LateContext<'a>, kind: rustc_hir::ExprKind<'b>) -
};
let ty_raw = cx.typeck_results().expr_ty(expr);
let ty = ty_raw.peel_refs();
if (ty_raw.is_ref() && needs_ref_to_cmp(cx, ty))
if needs_ref_to_cmp(cx, ty)
|| ty.is_str()
|| ty.is_slice()
|| matches!(get_type_diagnostic_name(cx, ty), Some(sym::OsStr | sym::OsString))
Expand Down Expand Up @@ -118,7 +118,7 @@ impl LateLintPass<'_> for ManualIgnoreCaseCmp {
snippet_with_applicability(cx, left_span, "_", &mut app),
snippet_with_applicability(cx, right_span, "_", &mut app)
),
app
app,
);
},
);
Expand Down
Loading

0 comments on commit 08b7bd7

Please sign in to comment.