diff options
author | Wez Furlong <wez@wezfurlong.org> | 2020-01-18 16:28:12 -0800 |
---|---|---|
committer | Wez Furlong <wez@wezfurlong.org> | 2020-01-18 16:28:12 -0800 |
commit | 92f466c07ccded1fe58f245320542cca69267e7e (patch) | |
tree | 1f0ae584aa79ab88a747a1acc402a2eafd19e983 /tests | |
parent | a22780feb63945bd549735e17b48074b4d7b1419 (diff) | |
download | ssh2-rs-92f466c07ccded1fe58f245320542cca69267e7e.zip |
ChannelInner is Send + Sync
This allows Channel and Stream to be Send
Diffstat (limited to 'tests')
-rw-r--r-- | tests/all/channel.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/all/channel.rs b/tests/all/channel.rs index 8b624ac..2f14d01 100644 --- a/tests/all/channel.rs +++ b/tests/all/channel.rs @@ -24,6 +24,13 @@ fn consume_stdio(channel: &mut Channel) -> (String, String) { fn smoke() { let sess = ::authed_session(); let mut channel = sess.channel_session().unwrap(); + + fn must_be_send<T: Send>(_: &T) -> bool { + true + } + assert!(must_be_send(&channel)); + assert!(must_be_send(&channel.stream(0))); + channel.flush().unwrap(); channel.exec("true").unwrap(); consume_stdio(&mut channel); |