summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2015-03-27 10:35:29 -0700
committerAlex Crichton <alex@alexcrichton.com>2015-03-27 10:35:29 -0700
commite8f19a4ab194d9c242a008db08c190ddbdc74926 (patch)
tree972b324ddd6e93b942c867f69f87fa6b7c7b7599 /src
parent1fc982577a5581fb38be9bbc73432bd4d4b20f5c (diff)
downloadssh2-rs-e8f19a4ab194d9c242a008db08c190ddbdc74926.zip
Fix lint errors
Diffstat (limited to 'src')
-rw-r--r--src/error.rs2
-rw-r--r--src/knownhosts.rs4
-rw-r--r--src/lib.rs1
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()
}
diff --git a/src/lib.rs b/src/lib.rs
index f92da30..9da2a4c 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -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))]