Skip to content

Commit

Permalink
missing clone on SodiumCtx and missing f_deps in Stream::listen
Browse files Browse the repository at this point in the history
  • Loading branch information
clinuxrulz committed Apr 23, 2020
1 parent 36ac756 commit a3e17ba
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "sodium-rust"
version = "2.0.0"
version = "2.0.1"
authors = ["Clinton Selke <[email protected]>"]
edition = "2018"
license = "BSD-3-Clause"
Expand Down
2 changes: 2 additions & 0 deletions src/impl_/stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,7 @@ impl<A:Send+'static> Stream<A> {

pub fn _listen<K:IsLambda1<A,()>+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(),
Expand All @@ -432,6 +433,7 @@ impl<A:Send+'static> Stream<A> {
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)
}

Expand Down
1 change: 1 addition & 0 deletions src/sodium_ctx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit a3e17ba

Please sign in to comment.