From 1c24ed09fa9610814b9c2693066f10fe0399c809 Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Sun, 27 Jul 2025 20:30:09 +0000 Subject: [PATCH] Fix misuse of try_select in logical-or future util. Signed-off-by: Jason Volk --- src/core/utils/future/bool_ext.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/core/utils/future/bool_ext.rs b/src/core/utils/future/bool_ext.rs index 24f239ff..c8f4ed50 100644 --- a/src/core/utils/future/bool_ext.rs +++ b/src/core/utils/future/bool_ext.rs @@ -4,7 +4,10 @@ use std::marker::Unpin; use futures::{ Future, FutureExt, - future::{select_ok, try_join, try_join_all, try_select}, + future::{ + Either::{Left, Right}, + select_ok, try_join, try_join_all, + }, }; pub trait BoolExt @@ -53,7 +56,7 @@ where let b = b.map(|b| b.then_some(()).ok_or(Result::Err(()))); - try_select(a, b).map(|result| result.is_ok()) + select_ok([Left(a), Right(b)]).map(|result| result.is_ok()) } }