From 356d4a0420e73dc55491322a21ad5872d2a08415 Mon Sep 17 00:00:00 2001 From: Steven Fackler Date: Mon, 2 May 2016 21:29:25 -0700 Subject: [PATCH] Remove AsRaw{Fd, Socket} impls An SslStream can't really act as a raw socket since you'd skip the whole TLS layer --- openssl/src/ssl/mod.rs | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/openssl/src/ssl/mod.rs b/openssl/src/ssl/mod.rs index c6ebb397..5536a99e 100644 --- a/openssl/src/ssl/mod.rs +++ b/openssl/src/ssl/mod.rs @@ -17,10 +17,6 @@ use libc::{c_uchar, c_uint}; #[cfg(any(feature = "npn", feature = "alpn"))] use std::slice; use std::marker::PhantomData; -#[cfg(unix)] -use std::os::unix::io::{AsRawFd, RawFd}; -#[cfg(windows)] -use std::os::windows::io::{AsRawSocket, RawSocket}; use ffi; use ffi_extras; @@ -1052,20 +1048,6 @@ impl fmt::Debug for SslStream where S: fmt::Debug } } -#[cfg(unix)] -impl AsRawFd for SslStream { - fn as_raw_fd(&self) -> RawFd { - self.get_ref().as_raw_fd() - } -} - -#[cfg(windows)] -impl AsRawSocket for SslStream { - fn as_raw_socket(&self) -> RawSocket { - self.get_ref().as_raw_socket() - } -} - impl SslStream { fn new_base(ssl: Ssl, stream: S) -> Self { unsafe {