Fix redox
This commit is contained in:
parent
c5b87a29dd
commit
4785c748f2
@ -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),
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user