Skip to content

Commit

Permalink
Fix redox
Browse files Browse the repository at this point in the history
  • Loading branch information
sfackler committed Feb 25, 2019
1 parent c5b87a2 commit 4785c74
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/libstd/sys/redox/net/tcp.rs
Expand Up @@ -34,8 +34,8 @@ impl TcpStream {
self.0.read(buf) self.0.read(buf)
} }


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


pub fn write_vectored(&self, bufs: &[IoVec<'_>]) -> io::Result<usize> { 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), Some(buf) => self.write(buf),
None => Ok(0), None => Ok(0),
} }
Expand Down

0 comments on commit 4785c74

Please sign in to comment.