From a3e17bae5d5b8807ee649b064c1fbc3257a8982c Mon Sep 17 00:00:00 2001 From: Clinton Selke Date: Fri, 24 Apr 2020 07:20:46 +1000 Subject: [PATCH] missing clone on SodiumCtx and missing f_deps in Stream::listen --- Cargo.toml | 2 +- src/impl_/stream.rs | 2 ++ src/sodium_ctx.rs | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 93bcb23..20f8628 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sodium-rust" -version = "2.0.0" +version = "2.0.1" authors = ["Clinton Selke "] edition = "2018" license = "BSD-3-Clause" diff --git a/src/impl_/stream.rs b/src/impl_/stream.rs index 7f4874f..b361229 100644 --- a/src/impl_/stream.rs +++ b/src/impl_/stream.rs @@ -418,6 +418,7 @@ impl Stream { pub fn _listen+Send+Sync+'static>(&self, mut k: K, weak: bool) -> Listener { let self_ = self.clone(); + let f_deps = lambda1_deps(&k); let node = Node::new( &self.sodium_ctx(), @@ -432,6 +433,7 @@ impl Stream { vec![self.box_clone()] ); IsNode::add_update_dependencies(&node, vec![self.to_dep()]); + IsNode::add_update_dependencies(&node, f_deps); Listener::new(&self.sodium_ctx(), weak, node) } diff --git a/src/sodium_ctx.rs b/src/sodium_ctx.rs index 2e6a1e3..dcf497d 100644 --- a/src/sodium_ctx.rs +++ b/src/sodium_ctx.rs @@ -6,6 +6,7 @@ use crate::StreamSink; use crate::StreamLoop; use crate::impl_::sodium_ctx::SodiumCtx as SodiumCtxImpl; +#[derive(Clone)] pub struct SodiumCtx { pub impl_: SodiumCtxImpl }