Simplify code
This commit is contained in:
parent
01b7411482
commit
2a47dbc7a6
1 changed files with 2 additions and 2 deletions
|
@ -2,7 +2,7 @@
|
|||
|
||||
use super::UNWRAP_OR_ELSE_DEFAULT;
|
||||
use clippy_utils::{
|
||||
diagnostics::span_lint_and_sugg, is_default_equivalent_call, is_trait_item, source::snippet_with_applicability,
|
||||
diagnostics::span_lint_and_sugg, is_default_equivalent_call, source::snippet_with_applicability,
|
||||
ty::is_type_diagnostic_item,
|
||||
};
|
||||
use rustc_errors::Applicability;
|
||||
|
@ -25,7 +25,7 @@ pub(super) fn check<'tcx>(
|
|||
|
||||
if_chain! {
|
||||
if is_option || is_result;
|
||||
if is_trait_item(cx, u_arg, sym::Default) || is_default_equivalent_call(cx, u_arg);
|
||||
if is_default_equivalent_call(cx, u_arg);
|
||||
then {
|
||||
let mut applicability = Applicability::MachineApplicable;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue