Skip to content

Commit

Permalink
chore(core): stream only send
Browse files Browse the repository at this point in the history
  • Loading branch information
vmenge committed Dec 30, 2024
1 parent 4eefeef commit 66c66c5
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions core/src/stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ struct Props<F, Snk> {
impl<F, Fut, S, T, E, Snk> Process for Source<F, Fut, S, T, E, Snk>
where
F: Fn() -> Fut + Send + Sync + 'static,
Fut: Future<Output = S> + Send + Sync + 'static,
S: Stream<Item = Result<T, E>> + Send + Sync + 'static + Unpin,
Fut: Future<Output = S> + Send + 'static,
S: Stream<Item = Result<T, E>> + Send + 'static + Unpin,
T: Send + Sync + 'static,
E: Send + Sync + 'static,
Snk: Sink<T> + Send + Sync + 'static,
Expand Down Expand Up @@ -118,11 +118,11 @@ where
impl<'a, P, F, Fut, S, T, E> StreamBuilder<'a, P, F, Fut, S, T, E, NoSink>
where
P: Process,
F: Fn() -> Fut + 'static,
Fut: Future<Output = S> + 'static,
F: Fn() -> Fut + 'static,
Fut: Future<Output = S> + 'static,
S: Stream<Item = Result<T, E>> + 'static + Unpin,
T: 'static,
E: 'static,
T: 'static,
E: 'static,
{
pub fn new(init: F, ctx: &'a mut Ctx<P>) -> Self {
Self {
Expand Down Expand Up @@ -170,7 +170,7 @@ where

impl<T, K> Sink<K> for Handle<T>
where
T: Send,
T: Send,
K: Sync + Send + Into<T>,
{
async fn consume(&self, item: K) {
Expand Down Expand Up @@ -210,4 +210,4 @@ where
let k: T = item.into();
let _ = self.send(k);
}
}
}

0 comments on commit 66c66c5

Please sign in to comment.