summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2015-02-19 08:06:02 -0800
committerAlex Crichton <alex@alexcrichton.com>2015-02-19 08:06:02 -0800
commite30841c82bbcb3d28270b0545db135053a13ac57 (patch)
tree1d81e26419ded9c02ab8e09f544ad7321c626649 /tests
parentc10cfb9a6eeae690b9f90c7f6bdbb162f02d6348 (diff)
downloadssh2-rs-e30841c82bbcb3d28270b0545db135053a13ac57.zip
Update to rust master
Diffstat (limited to 'tests')
-rw-r--r--tests/all.rs2
-rw-r--r--tests/channel.rs10
2 files changed, 6 insertions, 6 deletions
diff --git a/tests/all.rs b/tests/all.rs
index 749e976..491e4d4 100644
--- a/tests/all.rs
+++ b/tests/all.rs
@@ -1,5 +1,5 @@
#![deny(warnings)]
-#![feature(io, core, path, std_misc, libc, env)]
+#![feature(old_io, core, old_path, env)]
extern crate ssh2;
extern crate libc;
diff --git a/tests/channel.rs b/tests/channel.rs
index 3150f40..254f0fe 100644
--- a/tests/channel.rs
+++ b/tests/channel.rs
@@ -1,5 +1,5 @@
use std::old_io::{TcpListener, Listener, Acceptor, TcpStream};
-use std::thread::Thread;
+use std::thread;
#[test]
fn smoke() {
@@ -67,7 +67,7 @@ fn direct() {
let mut l = TcpListener::bind("127.0.0.1:0").unwrap();
let addr = l.socket_name().unwrap();
let mut a = l.listen().unwrap();
- let t = Thread::scoped(move|| {
+ let t = thread::scoped(move|| {
let mut s = a.accept().unwrap();
let b = &mut [0, 0, 0];
s.read(b).unwrap();
@@ -81,7 +81,7 @@ fn direct() {
let r = &mut [0, 0, 0];
channel.read(r).unwrap();
assert_eq!(r.as_slice(), [4, 5, 6].as_slice());
- t.join().ok().unwrap();
+ t.join();
}
#[test]
@@ -89,7 +89,7 @@ fn forward() {
let (_tcp, sess) = ::authed_session();
let (mut listen, port) = sess.channel_forward_listen(39249, None, None)
.unwrap();
- let t = Thread::scoped(move|| {
+ let t = thread::scoped(move|| {
let mut s = TcpStream::connect(("127.0.0.1", port)).unwrap();
let b = &mut [0, 0, 0];
s.read(b).unwrap();
@@ -102,5 +102,5 @@ fn forward() {
let r = &mut [0, 0, 0];
channel.read(r).unwrap();
assert_eq!(r.as_slice(), [4, 5, 6].as_slice());
- t.join().ok().unwrap();
+ t.join();
}