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 committed Aug 16, 2020
1 parent 94cf90e commit 9c41822
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 @@ -2717,8 +2717,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 9c41822

Please sign in to comment.