From a74705f1f43e1fc3633d1b69d8b0f35f066fc431 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Thu, 2 Apr 2015 18:21:23 -0700 Subject: Update for rust beta --- src/channel.rs | 4 ++-- src/lib.rs | 14 +++++++------- src/sftp.rs | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) (limited to 'src') diff --git a/src/channel.rs b/src/channel.rs index 73d7d9c..40933a1 100644 --- a/src/channel.rs +++ b/src/channel.rs @@ -40,7 +40,7 @@ pub struct ExitSignal { } /// Description of the read window as returned by `Channel::read_window` -#[derive(Copy)] +#[derive(Copy, Clone)] pub struct ReadWindow { /// The number of bytes which the remote end may send without overflowing /// the window limit. @@ -52,7 +52,7 @@ pub struct ReadWindow { } /// Description of the write window as returned by `Channel::write_window` -#[derive(Copy)] +#[derive(Copy, Clone)] pub struct WriteWindow { /// The number of bytes which may be safely written on the channel without /// blocking. diff --git a/src/lib.rs b/src/lib.rs index ea511f0..0f64d5f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -182,7 +182,7 @@ unsafe fn opt_bytes<'a, T>(_: &'a T, } #[allow(missing_docs)] -#[derive(Copy)] +#[derive(Copy, Clone)] pub enum DisconnectCode { HostNotAllowedToConnect = raw::SSH_DISCONNECT_HOST_NOT_ALLOWED_TO_CONNECT as isize, @@ -205,7 +205,7 @@ pub enum DisconnectCode { } #[allow(missing_docs)] -#[derive(Copy)] +#[derive(Copy, Clone)] pub enum HostKeyType { Unknown = raw::LIBSSH2_HOSTKEY_TYPE_UNKNOWN as isize, Rsa = raw::LIBSSH2_HOSTKEY_TYPE_RSA as isize, @@ -213,7 +213,7 @@ pub enum HostKeyType { } #[allow(missing_docs)] -#[derive(Copy)] +#[derive(Copy, Clone)] pub enum MethodType { Kex = raw::LIBSSH2_METHOD_KEX as isize, HostKey = raw::LIBSSH2_METHOD_HOSTKEY as isize, @@ -236,20 +236,20 @@ pub static FLUSH_ALL: i32 = -2; pub static EXTENDED_DATA_STDERR: i32 = 1; #[allow(missing_docs)] -#[derive(Copy)] +#[derive(Copy, Clone)] pub enum HashType { Md5 = raw::LIBSSH2_HOSTKEY_HASH_MD5 as isize, Sha1 = raw:: LIBSSH2_HOSTKEY_HASH_SHA1 as isize, } #[allow(missing_docs)] -#[derive(Copy)] +#[derive(Copy, Clone)] pub enum KnownHostFileKind { OpenSSH = raw::LIBSSH2_KNOWNHOST_FILE_OPENSSH as isize, } /// Possible results of a call to `KnownHosts::check` -#[derive(Copy)] +#[derive(Copy, Clone)] pub enum CheckResult { /// Hosts and keys match Match = raw::LIBSSH2_KNOWNHOST_CHECK_MATCH as isize, @@ -262,7 +262,7 @@ pub enum CheckResult { } #[allow(missing_docs)] -#[derive(Copy)] +#[derive(Copy, Clone)] pub enum KnownHostKeyFormat { Rsa1 = raw::LIBSSH2_KNOWNHOST_KEY_RSA1 as isize, SshRsa = raw::LIBSSH2_KNOWNHOST_KEY_SSHRSA as isize, diff --git a/src/sftp.rs b/src/sftp.rs index 918f4da..95326ee 100644 --- a/src/sftp.rs +++ b/src/sftp.rs @@ -89,7 +89,7 @@ bitflags! { } /// How to open a file handle with libssh2. -#[derive(Copy)] +#[derive(Copy, Clone)] pub enum OpenType { /// Specify that a file shoud be opened. File = raw::LIBSSH2_SFTP_OPENFILE as isize, -- cgit v1.2.3