From 93be1c4f2fdbfcdadc47e2760759493a2871faec Mon Sep 17 00:00:00 2001 From: Anthony Ramine Date: Tue, 21 Nov 2017 02:31:00 +0100 Subject: [PATCH] Update foreign-types to 0.3 --- openssl/Cargo.toml | 2 +- openssl/src/bn.rs | 6 ------ openssl/src/ssl/mod.rs | 7 ------- openssl/src/x509/mod.rs | 13 ------------- 4 files changed, 1 insertion(+), 27 deletions(-) diff --git a/openssl/Cargo.toml b/openssl/Cargo.toml index 5ed46998a..ded670753 100644 --- a/openssl/Cargo.toml +++ b/openssl/Cargo.toml @@ -20,7 +20,7 @@ v110 = [] [dependencies] bitflags = "0.9" -foreign-types = "0.2" +foreign-types = "0.3" lazy_static = "0.2" libc = "0.2" openssl-sys = { version = "0.9.21", path = "../openssl-sys" } diff --git a/openssl/src/bn.rs b/openssl/src/bn.rs index fc6e0bb85..82ec38b64 100644 --- a/openssl/src/bn.rs +++ b/openssl/src/bn.rs @@ -1090,12 +1090,6 @@ impl BigNum { } } -impl AsRef 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 176863d64..f3f1d2199 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}; @@ -1026,12 +1025,6 @@ impl Clone for SslSession { } } -impl Borrow 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 db61262ce..dff652223 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 for X509 { - fn as_ref(&self) -> &X509Ref { - &*self - } -} - impl AsRef for X509Ref { fn as_ref(&self) -> &X509Ref { self } } -impl Borrow for X509 { - fn borrow(&self) -> &X509Ref { - &*self - } -} - impl Stackable for X509 { type StackType = ffi::stack_st_X509; } -- GitLab