diff options
| author | Ada Alakbarova <ada.alakbarova@proton.me> | 2025-09-07 00:13:40 +0200 |
|---|---|---|
| committer | Ada Alakbarova <ada.alakbarova@proton.me> | 2025-09-07 00:13:40 +0200 |
| commit | fe86ce6bcc07ff199c804a6a2e0a66c8557c5364 (patch) | |
| tree | 3eb74956d355c88703900e2b4f1f6e3c82aa71cb | |
| parent | 24c34d738f00f0f38b88cead5ab869d156513609 (diff) | |
split `any` in two parts
| -rw-r--r-- | clippy_lints/src/future_not_send.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/clippy_lints/src/future_not_send.rs b/clippy_lints/src/future_not_send.rs index 2788b89f143..596047977a9 100644 --- a/clippy_lints/src/future_not_send.rs +++ b/clippy_lints/src/future_not_send.rs @@ -80,10 +80,10 @@ impl<'tcx> LateLintPass<'tcx> for FutureNotSend { && let Some(send_trait) = cx.tcx.get_diagnostic_item(sym::Send) && let preds = cx.tcx.explicit_item_self_bounds(def_id) // If is a Future - && preds.iter_instantiated_copied(cx.tcx, args).any(|(p, _)| { - p.as_trait_clause() - .is_some_and(|trait_pred| trait_pred.skip_binder().trait_ref.def_id == future_trait) - }) + && preds + .iter_instantiated_copied(cx.tcx, args) + .filter_map(|(p, _)| p.as_trait_clause()) + .any(|trait_pred| trait_pred.skip_binder().trait_ref.def_id == future_trait) { let span = decl.output.span(); let infcx = cx.tcx.infer_ctxt().build(cx.typing_mode()); |
