Skip to content

Commit

Permalink
Merge pull request sfackler#781 from sfackler/foreign-types-bump
Browse files Browse the repository at this point in the history
Upgrade foreign-types
  • Loading branch information
sfackler authored Nov 27, 2017
2 parents 27a5b33 + e9ad9f1 commit f608570
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 29 deletions.
2 changes: 1 addition & 1 deletion openssl/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ v110 = []

[dependencies]
bitflags = "0.9"
foreign-types = "0.2"
foreign-types = "0.3.1"
lazy_static = "0.2"
libc = "0.2"
openssl-sys = { version = "0.9.21", path = "../openssl-sys" }
Expand Down
6 changes: 0 additions & 6 deletions openssl/src/bn.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1090,12 +1090,6 @@ impl BigNum {
}
}

impl AsRef<BigNumRef> for BigNum {
fn as_ref(&self) -> &BigNumRef {
self.deref()
}
}

impl fmt::Debug for BigNumRef {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match self.to_dec_str() {
Expand Down
10 changes: 1 addition & 9 deletions openssl/src/ssl/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ use libc::{c_int, c_long, c_ulong, c_void};
use libc::{c_uchar, c_uint};
use std::any::Any;
use std::any::TypeId;
use std::borrow::Borrow;
use std::cmp;
use std::collections::HashMap;
use std::ffi::{CStr, CString};
Expand Down Expand Up @@ -777,8 +776,7 @@ impl SslContextBuilder {
#[cfg(not(osslconf = "OPENSSL_NO_PSK"))]
pub fn set_psk_callback<F>(&mut self, callback: F)
where
F: Fn(&mut SslRef, Option<&[u8]>, &mut [u8], &mut [u8])
-> Result<usize, ErrorStack>
F: Fn(&mut SslRef, Option<&[u8]>, &mut [u8], &mut [u8]) -> Result<usize, ErrorStack>
+ Any
+ 'static
+ Sync
Expand Down Expand Up @@ -1026,12 +1024,6 @@ impl Clone for SslSession {
}
}

impl Borrow<SslSessionRef> for SslSession {
fn borrow(&self) -> &SslSessionRef {
&self
}
}

impl ToOwned for SslSessionRef {
type Owned = SslSession;

Expand Down
13 changes: 0 additions & 13 deletions openssl/src/x509/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
use libc::{c_int, c_long};
use ffi;
use foreign_types::{ForeignType, ForeignTypeRef};
use std::borrow::Borrow;
use std::collections::HashMap;
use std::error::Error;
use std::ffi::{CStr, CString};
Expand Down Expand Up @@ -620,24 +619,12 @@ impl Clone for X509 {
}
}

impl AsRef<X509Ref> for X509 {
fn as_ref(&self) -> &X509Ref {
&*self
}
}

impl AsRef<X509Ref> for X509Ref {
fn as_ref(&self) -> &X509Ref {
self
}
}

impl Borrow<X509Ref> for X509 {
fn borrow(&self) -> &X509Ref {
&*self
}
}

impl Stackable for X509 {
type StackType = ffi::stack_st_X509;
}
Expand Down

0 comments on commit f608570

Please sign in to comment.