Skip to content

Commit 57347f2

Browse files
committed
switch to the default implementation of write_vectored
1 parent 6727130 commit 57347f2

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

Diff for: std/src/sys/pal/hermit/net.rs

+2-8
Original file line numberDiff line numberDiff line change
@@ -225,17 +225,11 @@ impl Socket {
225225
}
226226

227227
pub fn write_vectored(&self, bufs: &[IoSlice<'_>]) -> io::Result<usize> {
228-
let mut size: isize = 0;
229-
230-
for i in bufs.iter() {
231-
size += cvt(unsafe { netc::write(self.0.as_raw_fd(), i.as_ptr(), i.len()) })?;
232-
}
233-
234-
Ok(size.try_into().unwrap())
228+
crate::io::default_write_vectored(|b| self.write(b), bufs)
235229
}
236230

237231
pub fn is_write_vectored(&self) -> bool {
238-
true
232+
false
239233
}
240234

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

0 commit comments

Comments
 (0)