We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
write_vectored
1 parent 6727130 commit 57347f2Copy full SHA for 57347f2
std/src/sys/pal/hermit/net.rs
@@ -225,17 +225,11 @@ impl Socket {
225
}
226
227
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())
+ crate::io::default_write_vectored(|b| self.write(b), bufs)
235
236
237
pub fn is_write_vectored(&self) -> bool {
238
- true
+ false
239
240
241
pub fn set_timeout(&self, dur: Option<Duration>, kind: i32) -> io::Result<()> {
0 commit comments