]> git.lizzy.rs Git - rust.git/blobdiff - clippy_lints/src/methods/unnecessary_lazy_eval.rs
Improve heuristics for determining whether eager of lazy evaluation is preferred
[rust.git] / clippy_lints / src / methods / unnecessary_lazy_eval.rs
index 740af750b48a7bdaf9fc1a50d47cd1392e21fb1e..1e2765263c87ddb0ed920c8da8a71b74394ee0b3 100644 (file)
@@ -30,7 +30,7 @@ pub(super) fn check<'tcx>(
                 return;
             }
 
-            if eager_or_lazy::is_eagerness_candidate(cx, body_expr) {
+            if eager_or_lazy::switch_to_eager_eval(cx, body_expr) {
                 let msg = if is_option {
                     "unnecessary closure used to substitute value for `Option::None`"
                 } else {