Skip to content

Commit 8b19845

Browse files
committed
refactor
1 parent ab77c92 commit 8b19845

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

clippy_lints/src/methods/unwrap_or_else_default.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ use clippy_utils::{
55
diagnostics::span_lint_and_sugg, is_default_equivalent_ctor, is_diag_trait_item, is_trait_item,
66
source::snippet_with_applicability, ty::is_type_diagnostic_item,
77
};
8-
use rustc_hir::ExprKind;
9-
108
use rustc_errors::Applicability;
119
use rustc_hir as hir;
1210
use rustc_lint::LateContext;
@@ -26,7 +24,7 @@ pub(super) fn check<'tcx>(
2624
let is_result = is_type_diagnostic_item(cx, recv_ty, sym::Result);
2725

2826
let is_default_eq = match &u_arg.kind {
29-
ExprKind::Path(qpath) => {
27+
hir::ExprKind::Path(qpath) => {
3028
if let Some(repl_def_id) = cx.qpath_res(qpath, u_arg.hir_id).opt_def_id() {
3129
if is_diag_trait_item(cx, repl_def_id, sym::Default)
3230
|| is_default_equivalent_ctor(cx, repl_def_id, qpath)

0 commit comments

Comments
 (0)