From f4761bb2929bdacb3a0c6f855921239d968b84b0 Mon Sep 17 00:00:00 2001 From: Steven Fackler Date: Thu, 2 Apr 2015 13:59:55 -0700 Subject: [PATCH] Remove two features --- openssl/src/lib.rs | 2 +- openssl/src/ssl/mod.rs | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/openssl/src/lib.rs b/openssl/src/lib.rs index a7136cf5..707742ba 100644 --- a/openssl/src/lib.rs +++ b/openssl/src/lib.rs @@ -1,4 +1,4 @@ -#![feature(core, std_misc, unique)] +#![feature(unique)] #![doc(html_root_url="https://sfackler.github.io/rust-openssl/doc/openssl")] #[macro_use] diff --git a/openssl/src/ssl/mod.rs b/openssl/src/ssl/mod.rs index 9f63ac4d..30821f4e 100644 --- a/openssl/src/ssl/mod.rs +++ b/openssl/src/ssl/mod.rs @@ -5,7 +5,6 @@ use std::ffi::{CStr, CString}; use std::fmt; use std::io; use std::io::prelude::*; -use std::ffi::AsOsStr; use std::mem; use std::net; use std::path::Path; @@ -13,7 +12,7 @@ use std::ptr; use std::sync::{Once, ONCE_INIT, Arc, Mutex}; use std::ops::{Deref, DerefMut}; use std::cmp; -use std::marker::Reflect; +use std::any::Any; #[cfg(feature = "npn")] use libc::{c_uchar, c_uint}; #[cfg(feature = "npn")] @@ -132,7 +131,7 @@ lazy_static! { // Creates a static index for user data of type T // Registers a destructor for the data which will be called // when context is freed -fn get_verify_data_idx() -> c_int { +fn get_verify_data_idx() -> c_int { extern fn free_data_box(_parent: *mut c_void, ptr: *mut c_void, _ad: *mut ffi::CRYPTO_EX_DATA, _idx: c_int, _argl: c_long, _argp: *mut c_void) { @@ -199,7 +198,7 @@ extern fn raw_verify(preverify_ok: c_int, x509_ctx: *mut ffi::X509_STORE_CTX) extern fn raw_verify_with_data(preverify_ok: c_int, x509_ctx: *mut ffi::X509_STORE_CTX) -> c_int - where T: Reflect + 'static { + where T: Any + 'static { unsafe { let idx = ffi::SSL_get_ex_data_X509_STORE_CTX_idx(); let ssl = ffi::X509_STORE_CTX_get_ex_data(x509_ctx, idx); @@ -356,7 +355,7 @@ impl SslContext { pub fn set_verify_with_data(&mut self, mode: SslVerifyMode, verify: VerifyCallbackData, data: T) - where T: Reflect + 'static { + where T: Any + 'static { let data = Box::new(data); unsafe { ffi::SSL_CTX_set_ex_data(*self.ctx, VERIFY_IDX,