Skip to content
Permalink
Browse files

Fix sgx

  • Loading branch information...
sfackler committed Feb 24, 2019
1 parent 4c13791 commit c5b87a29ddea3674a2b2bfe797698fd2fc1bb211
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/libstd/sys/sgx/net.rs
@@ -1,5 +1,5 @@
use fmt;
use io;
use io::{self, IoVec, IoVecMut};
use net::{SocketAddr, Shutdown, Ipv4Addr, Ipv6Addr, ToSocketAddrs};
use time::Duration;
use sys::{unsupported, Void, sgx_ineffective, AsInner, FromInner, IntoInner, TryIntoInner};
@@ -104,7 +104,7 @@ impl TcpStream {
}

pub fn read_vectored(&self, buf: &mut [IoVecMut<'_>]) -> io::Result<usize> {
let buf = match buf.get(0) {
let buf = match buf.get_mut(0) {
Some(buf) => buf,
None => return Ok(0),
};
@@ -120,7 +120,7 @@ impl TcpStream {
Some(buf) => buf,
None => return Ok(0),
};
self.read(buf)
self.write(buf)
}

pub fn peer_addr(&self) -> io::Result<SocketAddr> {

0 comments on commit c5b87a2

Please sign in to comment.
You can’t perform that action at this time.