Skip to content
Permalink
Browse files

Fix redox

  • Loading branch information...
sfackler committed Feb 25, 2019
1 parent c5b87a2 commit 4785c748f2190440fb3f90b5319f121f2d31e0e4
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/libstd/sys/redox/net/tcp.rs
@@ -34,8 +34,8 @@ impl TcpStream {
self.0.read(buf)
}

pub fn read_vectored(&self, buf: &mut [IoVecMut<'_>]) -> io::Result<usize> {
match buf.iter_mut().find(|b| !b.is_empty()) {
pub fn read_vectored(&self, bufs: &mut [IoVecMut<'_>]) -> io::Result<usize> {
match bufs.iter_mut().find(|b| !b.is_empty()) {
Some(buf) => self.read(buf),
None => Ok(0),
}
@@ -46,7 +46,7 @@ impl TcpStream {
}

pub fn write_vectored(&self, bufs: &[IoVec<'_>]) -> io::Result<usize> {
match buf.iter().find(|b| !b.is_empty()) {
match bufs.iter().find(|b| !b.is_empty()) {
Some(buf) => self.write(buf),
None => Ok(0),
}

0 comments on commit 4785c74

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