about summary refs log tree commit diff
path: root/clippy_utils/src/usage.rs
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2024-05-09 11:33:53 -0400
committerMichael Goulet <michael@errs.io>2024-05-12 12:50:18 -0400
commite65cefcf6f22cb482bcd2ae40c99f6baab8d99bc (patch)
tree6393c2c34c6e2f6c8c1cdc03866221b2221c7952 /clippy_utils/src/usage.rs
parentdb193c1c9da7aa97d25815c5d2020d2bf5bbc038 (diff)
downloadrust-e65cefcf6f22cb482bcd2ae40c99f6baab8d99bc.tar.gz
rust-e65cefcf6f22cb482bcd2ae40c99f6baab8d99bc.zip
Propagate errors rather than using return_if_err
Diffstat (limited to 'clippy_utils/src/usage.rs')
-rw-r--r--clippy_utils/src/usage.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/clippy_utils/src/usage.rs b/clippy_utils/src/usage.rs
index d0ab6d434aa..9abb4ef9b8d 100644
--- a/clippy_utils/src/usage.rs
+++ b/clippy_utils/src/usage.rs
@@ -21,7 +21,8 @@ pub fn mutated_variables<'tcx>(expr: &'tcx Expr<'_>, cx: &LateContext<'tcx>) ->
         expr.hir_id.owner.def_id,
         &mut delegate,
     )
-    .walk_expr(expr);
+    .walk_expr(expr)
+    .into_ok();
 
     if delegate.skip {
         return None;