diff options
author | Alex Crichton <alex@alexcrichton.com> | 2015-03-27 10:35:29 -0700 |
---|---|---|
committer | Alex Crichton <alex@alexcrichton.com> | 2015-03-27 10:35:29 -0700 |
commit | e8f19a4ab194d9c242a008db08c190ddbdc74926 (patch) | |
tree | 972b324ddd6e93b942c867f69f87fa6b7c7b7599 /src | |
parent | 1fc982577a5581fb38be9bbc73432bd4d4b20f5c (diff) | |
download | ssh2-rs-e8f19a4ab194d9c242a008db08c190ddbdc74926.zip |
Fix lint errors
Diffstat (limited to 'src')
-rw-r--r-- | src/error.rs | 2 | ||||
-rw-r--r-- | src/knownhosts.rs | 4 | ||||
-rw-r--r-- | src/lib.rs | 1 |
3 files changed, 4 insertions, 3 deletions
diff --git a/src/error.rs b/src/error.rs index fe37c48..d6d2a7b 100644 --- a/src/error.rs +++ b/src/error.rs @@ -26,7 +26,7 @@ impl Error { let rc = raw::libssh2_session_last_error(sess.raw(), &mut msg, 0 as *mut _, 0); if rc == 0 { return None } - let s = ::opt_bytes(&STATIC, msg as *const _).unwrap(); + let s = ::opt_bytes(&STATIC, msg).unwrap(); Some(Error::new(rc, str::from_utf8(s).unwrap())) } } diff --git a/src/knownhosts.rs b/src/knownhosts.rs index 20d18a1..d673660 100644 --- a/src/knownhosts.rs +++ b/src/knownhosts.rs @@ -248,7 +248,7 @@ impl<'kh> Host<'kh> { /// This is `None` if no plain text host name exists. pub fn name(&self) -> Option<&str> { unsafe { - ::opt_bytes(self, (*self.raw).name as *const _) + ::opt_bytes(self, (*self.raw).name) .and_then(|s| str::from_utf8(s).ok()) } } @@ -256,7 +256,7 @@ impl<'kh> Host<'kh> { /// Returns the key in base64/printable format pub fn key(&self) -> &str { let bytes = unsafe { - ::opt_bytes(self, (*self.raw).key as *const _).unwrap() + ::opt_bytes(self, (*self.raw).key).unwrap() }; str::from_utf8(bytes).unwrap() } @@ -125,6 +125,7 @@ #![doc(html_root_url = "http://alexcrichton.com/ssh2-rs")] #![feature(unsafe_destructor, std_misc, collections, io, io_ext, convert)] +#![allow(trivial_numeric_casts)] #![deny(missing_docs, unused_results)] #![cfg_attr(test, deny(warnings))] |