Skip to content

Commit a64a061

Browse files
authored
Fix formatting in UnixStream write implementation
1 parent 65561db commit a64a061

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Diff for: library/std/src/os/unix/net/stream.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -664,11 +664,11 @@ impl io::Write for UnixStream {
664664
#[stable(feature = "unix_socket", since = "1.10.0")]
665665
impl<'a> io::Write for &'a UnixStream {
666666
fn write(&mut self, buf: &[u8]) -> io::Result<usize> {
667-
let len = cmp::min(buf.len(), <wrlen_t>::MAX as usize) as wrlen_t;
668-
let ret = cvt(unsafe {
669-
libc::send(self.0.as_raw(), buf.as_ptr() as *const c_void, len, MSG_NOSIGNAL)
670-
})?;
671-
Ok(ret as usize)
667+
let len = cmp::min(buf.len(), <wrlen_t>::MAX as usize) as wrlen_t;
668+
let ret = cvt(unsafe {
669+
libc::send(self.0.as_raw(), buf.as_ptr() as *const c_void, len, MSG_NOSIGNAL)
670+
})?;
671+
Ok(ret as usize)
672672
}
673673

674674
fn write_vectored(&mut self, bufs: &[IoSlice<'_>]) -> io::Result<usize> {

0 commit comments

Comments
 (0)