diff options
-rw-r--r-- | src/lib.rs | 2 | ||||
-rw-r--r-- | src/sftp.rs | 2 | ||||
-rw-r--r-- | tests/channel.rs | 4 |
3 files changed, 3 insertions, 5 deletions
@@ -131,7 +131,7 @@ pub fn init() { unsafe { INIT.doit(|| { assert_eq!(raw::libssh2_init(0), 0); - rt::at_exit(proc() { + rt::at_exit(|| { raw::libssh2_exit(); }); }) diff --git a/src/sftp.rs b/src/sftp.rs index d79de74..173b755 100644 --- a/src/sftp.rs +++ b/src/sftp.rs @@ -49,7 +49,6 @@ pub struct FileStat { bitflags! { #[doc = "Options that can be used to configure how a file is opened"] - #[deriving(Copy)] flags OpenFlags: c_ulong { #[doc = "Open the file for reading."] const READ = raw::LIBSSH2_FXF_READ, @@ -75,7 +74,6 @@ bitflags! { bitflags! { #[doc = "Options to `Sftp::rename`"] - #[deriving(Copy)] flags RenameFlags: c_long { #[doc = "In a rename operation, overwrite the destination if it \ already exists. If this flag is not present then it is an \ diff --git a/tests/channel.rs b/tests/channel.rs index 3634cd7..c41cb70 100644 --- a/tests/channel.rs +++ b/tests/channel.rs @@ -67,7 +67,7 @@ fn direct() { let addr = l.socket_name().unwrap(); let mut a = l.listen().unwrap(); let (tx, rx) = channel(); - spawn(proc() { + spawn(move|| { let mut s = a.accept().unwrap(); let b = &mut [0, 0, 0]; s.read(b).unwrap(); @@ -91,7 +91,7 @@ fn forward() { let (mut listen, port) = sess.channel_forward_listen(39249, None, None) .unwrap(); let (tx, rx) = channel(); - spawn(proc() { + spawn(move|| { let mut s = TcpStream::connect(("127.0.0.1", port)).unwrap(); let b = &mut [0, 0, 0]; s.read(b).unwrap(); |