use FnMut for ready_try_for_each extension

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk 2024-11-03 11:22:38 +00:00
parent 8d251003a2
commit 768e81741c

View file

@ -24,7 +24,7 @@ where
self, f: F, self, f: F,
) -> TryForEach<Self, Ready<Result<(), E>>, impl FnMut(S::Ok) -> Ready<Result<(), E>>> ) -> TryForEach<Self, Ready<Result<(), E>>, impl FnMut(S::Ok) -> Ready<Result<(), E>>>
where where
F: Fn(S::Ok) -> Result<(), E>; F: FnMut(S::Ok) -> Result<(), E>;
} }
impl<T, E, S> TryReadyExt<T, E, S> for S impl<T, E, S> TryReadyExt<T, E, S> for S
@ -42,10 +42,10 @@ where
#[inline] #[inline]
fn ready_try_for_each<F>( fn ready_try_for_each<F>(
self, f: F, self, mut f: F,
) -> TryForEach<Self, Ready<Result<(), E>>, impl FnMut(S::Ok) -> Ready<Result<(), E>>> ) -> TryForEach<Self, Ready<Result<(), E>>, impl FnMut(S::Ok) -> Ready<Result<(), E>>>
where where
F: Fn(S::Ok) -> Result<(), E>, F: FnMut(S::Ok) -> Result<(), E>,
{ {
self.try_for_each(move |t| ready(f(t))) self.try_for_each(move |t| ready(f(t)))
} }