diff options
| author | Michael Goulet <michael@errs.io> | 2024-05-09 11:33:53 -0400 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2024-05-12 12:50:18 -0400 |
| commit | e65cefcf6f22cb482bcd2ae40c99f6baab8d99bc (patch) | |
| tree | 6393c2c34c6e2f6c8c1cdc03866221b2221c7952 /clippy_lints/src/methods | |
| parent | db193c1c9da7aa97d25815c5d2020d2bf5bbc038 (diff) | |
| download | rust-e65cefcf6f22cb482bcd2ae40c99f6baab8d99bc.tar.gz rust-e65cefcf6f22cb482bcd2ae40c99f6baab8d99bc.zip | |
Propagate errors rather than using return_if_err
Diffstat (limited to 'clippy_lints/src/methods')
| -rw-r--r-- | clippy_lints/src/methods/iter_overeager_cloned.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/clippy_lints/src/methods/iter_overeager_cloned.rs b/clippy_lints/src/methods/iter_overeager_cloned.rs index d4c709de97f..a52d38790a2 100644 --- a/clippy_lints/src/methods/iter_overeager_cloned.rs +++ b/clippy_lints/src/methods/iter_overeager_cloned.rs @@ -9,7 +9,6 @@ use rustc_lint::LateContext; use rustc_middle::mir::{FakeReadCause, Mutability}; use rustc_middle::ty::{self, BorrowKind}; use rustc_span::sym; -use rustc_trait_selection::infer::TyCtxtInferExt; use super::ITER_OVEREAGER_CLONED; use crate::redundant_clone::REDUNDANT_CLONE; @@ -75,7 +74,7 @@ pub(super) fn check<'tcx>( closure.def_id, &mut delegate, ) - .consume_body(body); + .consume_body(body).into_ok(); let mut to_be_discarded = false; |
