Skip to content

Commit

Permalink
switch to the default implementation of write_vectored
Browse files Browse the repository at this point in the history
  • Loading branch information
stlankes committed May 20, 2024
1 parent 75cb5c5 commit c170bf9
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions library/std/src/sys/pal/hermit/net.rs
Original file line number Diff line number Diff line change
Expand Up @@ -225,17 +225,11 @@ impl Socket {
}

pub fn write_vectored(&self, bufs: &[IoSlice<'_>]) -> io::Result<usize> {
let mut size: isize = 0;

for i in bufs.iter() {
size += cvt(unsafe { netc::write(self.0.as_raw_fd(), i.as_ptr(), i.len()) })?;
}

Ok(size.try_into().unwrap())
crate::io::default_write_vectored(|b| self.write(b), bufs)
}

pub fn is_write_vectored(&self) -> bool {
true
false
}

pub fn set_timeout(&self, dur: Option<Duration>, kind: i32) -> io::Result<()> {
Expand Down

0 comments on commit c170bf9

Please sign in to comment.