Skip to content

Commit

Permalink
DBG
Browse files Browse the repository at this point in the history
  • Loading branch information
martin-kolarik committed Sep 2, 2023
1 parent d1b8000 commit 5ab9a31
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions src/futures_signals_ext.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use futures_signals::{
signal::{Mutable, Signal},
signal_vec::{
Filter, MutableSignalVec, MutableVec, MutableVecLockMut, MutableVecLockRef, SignalVec,
SignalVecExt,
Filter, FilterSignalCloned, MutableSignalVec, MutableVec, MutableVecLockMut,
MutableVecLockRef, SignalVecExt,
},
};
use pin_project_lite::pin_project;
Expand Down Expand Up @@ -132,13 +132,16 @@ pub trait MutableVecExt<A> {
P: FnMut(&A) -> bool,
F: FnMut(&A) -> U;

fn signal_vec_filter_signal<P, S>(&self, p: P) -> impl SignalVec<Item = A>
fn signal_vec_filter_signal<P, S>(&self, p: P) -> FilterSignalCloned<MutableSignalVec<A>, S, P>
where
A: Copy,
P: FnMut(&A) -> S,
S: Signal<Item = bool>;

fn signal_vec_filter_signal_cloned<P, S>(&self, p: P) -> impl SignalVec<Item = A>
fn signal_vec_filter_signal_cloned<P, S>(
&self,
p: P,
) -> FilterSignalCloned<MutableSignalVec<A>, S, P>
where
A: Clone,
P: FnMut(&A) -> S,
Expand Down Expand Up @@ -312,7 +315,7 @@ impl<A> MutableVecExt<A> for MutableVec<A> {
.to_signal_map(move |e| e.first().map(&mut f))
}

fn signal_vec_filter_signal<P, S>(&self, p: P) -> impl SignalVec<Item = A>
fn signal_vec_filter_signal<P, S>(&self, p: P) -> FilterSignalCloned<MutableSignalVec<A>, S, P>
where
A: Copy,
P: FnMut(&A) -> S,
Expand All @@ -321,7 +324,10 @@ impl<A> MutableVecExt<A> for MutableVec<A> {
self.signal_vec().filter_signal_cloned(p)
}

fn signal_vec_filter_signal_cloned<P, S>(&self, p: P) -> impl SignalVec<Item = A>
fn signal_vec_filter_signal_cloned<P, S>(
&self,
p: P,
) -> FilterSignalCloned<MutableSignalVec<A>, S, P>
where
A: Clone,
P: FnMut(&A) -> S,
Expand Down

0 comments on commit 5ab9a31

Please sign in to comment.