Blob Blame History Raw
From e9ad9f1afd0429dd56af8e59ec9ad74020ca15e3 Mon Sep 17 00:00:00 2001
From: Steven Fackler <sfackler@gmail.com>
Date: Sun, 26 Nov 2017 17:07:24 -0700
Subject: [PATCH] Upgrade foreign-types

foreign-types 0.3 and 0.2 now share the same types and traits, so this
is backwards compatible.
---
 openssl/src/bn.rs       |  6 ------
 openssl/src/ssl/mod.rs  | 10 +---------
 openssl/src/x509/mod.rs | 13 -------------
 3 files changed, 1 insertion(+), 28 deletions(-)

diff --git a/openssl/src/bn.rs b/openssl/src/bn.rs
index fc6e0bb8..82ec38b6 100644
--- a/openssl/src/bn.rs
+++ b/openssl/src/bn.rs
@@ -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() {
diff --git a/openssl/src/ssl/mod.rs b/openssl/src/ssl/mod.rs
index 176863d6..e135535a 100644
--- a/openssl/src/ssl/mod.rs
+++ b/openssl/src/ssl/mod.rs
@@ -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};
@@ -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
@@ -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;
 
diff --git a/openssl/src/x509/mod.rs b/openssl/src/x509/mod.rs
index db61262c..dff65222 100644
--- a/openssl/src/x509/mod.rs
+++ b/openssl/src/x509/mod.rs
@@ -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};
@@ -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;
 }
-- 
2.15.0