about summary refs log tree commit diff
path: root/clippy_lints/src/methods
diff options
context:
space:
mode:
authorOli Scherer <git-spam-no-reply9815368754983@oli-obk.de>2024-01-12 16:58:29 +0000
committerOli Scherer <git-spam-no-reply9815368754983@oli-obk.de>2024-01-17 10:02:32 +0000
commit4488653ec6e4591ebfc43470cd3718f1f2c4fce2 (patch)
tree15ceb2cfa7bf3c1f587cb57c9f18347cfc2a011f /clippy_lints/src/methods
parent6a74a0e17ba5e13df18efe4cb77283a9a60065f1 (diff)
downloadrust-4488653ec6e4591ebfc43470cd3718f1f2c4fce2.tar.gz
rust-4488653ec6e4591ebfc43470cd3718f1f2c4fce2.zip
Fix clippy
Diffstat (limited to 'clippy_lints/src/methods')
-rw-r--r--clippy_lints/src/methods/or_fun_call.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/clippy_lints/src/methods/or_fun_call.rs b/clippy_lints/src/methods/or_fun_call.rs
index e38c66f6741..0602eeaa704 100644
--- a/clippy_lints/src/methods/or_fun_call.rs
+++ b/clippy_lints/src/methods/or_fun_call.rs
@@ -73,7 +73,8 @@ pub(super) fn check<'tcx>(
         let has_suggested_method = receiver_ty.ty_adt_def().is_some_and(|adt_def| {
             cx.tcx
                 .inherent_impls(adt_def.did())
-                .iter()
+                .into_iter()
+                .flatten()
                 .flat_map(|impl_id| cx.tcx.associated_items(impl_id).filter_by_name_unhygienic(sugg))
                 .any(|assoc| {
                     assoc.fn_has_self_parameter