Skip to content

Commit

Permalink
Apply suggested change
Browse files Browse the repository at this point in the history
Co-authored-by: Philipp Krones <[email protected]>
  • Loading branch information
bugadani and flip1995 authored Jul 26, 2020
1 parent 14b50a0 commit 6cd7af1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions clippy_lints/src/methods/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2657,8 +2657,8 @@ fn lint_lazy_eval<'tcx>(
allow_variant_calls: bool,
simplify_using: &str,
) {
let is_option = is_type_diagnostic_item(cx, cx.tables().expr_ty(&args[0]), sym!(option_type));
let is_result = is_type_diagnostic_item(cx, cx.tables().expr_ty(&args[0]), sym!(result_type));
let is_option = is_type_diagnostic_item(cx, cx.typeck_results().expr_ty(&args[0]), sym!(option_type));
let is_result = is_type_diagnostic_item(cx, cx.typeck_results().expr_ty(&args[0]), sym!(result_type));

if !is_option && !is_result {
return;
Expand Down

0 comments on commit 6cd7af1

Please sign in to comment.