diff options
| author | Steven Fackler <[email protected]> | 2015-03-25 21:50:21 -0700 |
|---|---|---|
| committer | Steven Fackler <[email protected]> | 2015-03-25 21:50:21 -0700 |
| commit | 36c90bb2054d4cbe3b29cc518b2929ac0034e6b8 (patch) | |
| tree | 8ce9722b0988e265fc0b9cfa28cf92f32b0474fa /openssl/src/ssl | |
| parent | Release v0.5.2 (diff) | |
| download | rust-openssl-36c90bb2054d4cbe3b29cc518b2929ac0034e6b8.tar.xz rust-openssl-36c90bb2054d4cbe3b29cc518b2929ac0034e6b8.zip | |
Fix deprecation warnings
Diffstat (limited to 'openssl/src/ssl')
| -rw-r--r-- | openssl/src/ssl/error.rs | 6 | ||||
| -rw-r--r-- | openssl/src/ssl/mod.rs | 3 | ||||
| -rw-r--r-- | openssl/src/ssl/tests.rs | 7 |
3 files changed, 7 insertions, 9 deletions
diff --git a/openssl/src/ssl/error.rs b/openssl/src/ssl/error.rs index 81f38692..91aad549 100644 --- a/openssl/src/ssl/error.rs +++ b/openssl/src/ssl/error.rs @@ -132,7 +132,7 @@ fn test_uknown_error_should_have_correct_messages() { let UnknownError { ref library, ref function, ref reason } = errs[0]; - assert_eq!(library.as_slice(), "SSL routines"); - assert_eq!(function.as_slice(), "SSL23_GET_SERVER_HELLO"); - assert_eq!(reason.as_slice(), "sslv3 alert handshake failure"); + assert_eq!(&library[..], "SSL routines"); + assert_eq!(&function[..], "SSL23_GET_SERVER_HELLO"); + assert_eq!(&reason[..], "sslv3 alert handshake failure"); } diff --git a/openssl/src/ssl/mod.rs b/openssl/src/ssl/mod.rs index 3aa01d41..0763c207 100644 --- a/openssl/src/ssl/mod.rs +++ b/openssl/src/ssl/mod.rs @@ -1,4 +1,4 @@ -use libc::{c_int, c_void, c_long, c_uint, c_uchar}; +use libc::{c_int, c_void, c_long}; use std::ffi::{CStr, CString}; use std::fmt; use std::io; @@ -6,7 +6,6 @@ use std::io::prelude::*; use std::ffi::AsOsStr; use std::mem; use std::net; -use std::slice; use std::num::FromPrimitive; use std::num::Int; use std::path::Path; diff --git a/openssl/src/ssl/tests.rs b/openssl/src/ssl/tests.rs index 468b1053..3000dae0 100644 --- a/openssl/src/ssl/tests.rs +++ b/openssl/src/ssl/tests.rs @@ -1,16 +1,15 @@ use serialize::hex::FromHex; -use std::net::{TcpStream, TcpListener}; +use std::net::TcpStream; use std::io; use std::io::prelude::*; use std::path::Path; -use std::thread; use crypto::hash::Type::{SHA256}; use ssl; use ssl::SslMethod::Sslv23; use ssl::{SslContext, SslStream, VerifyCallback}; use ssl::SslVerifyMode::SslVerifyPeer; -use x509::{X509StoreContext, X509FileType}; +use x509::X509StoreContext; #[test] fn test_new_ctx() { @@ -155,7 +154,7 @@ fn test_verify_callback_data() { None => false, Some(cert) => { let fingerprint = cert.fingerprint(SHA256).unwrap(); - fingerprint.as_slice() == node_id.as_slice() + &fingerprint == node_id } } } |