Skip to content

Commit

Permalink
Remove unidiomatic returns
Browse files Browse the repository at this point in the history
  • Loading branch information
a1phyr committed Oct 6, 2021
1 parent 402bf38 commit 2358f56
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions library/std/src/sys/unix/fd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ impl FileDesc {

#[cfg(target_os = "espidf")]
pub fn read_vectored(&self, bufs: &mut [IoSliceMut<'_>]) -> io::Result<usize> {
return crate::io::default_read_vectored(|b| self.read(b), bufs);
io::default_read_vectored(|b| self.read(b), bufs)
}

#[inline]
Expand Down Expand Up @@ -142,7 +142,7 @@ impl FileDesc {

#[cfg(target_os = "espidf")]
pub fn read_vectored_at(&self, bufs: &mut [IoSliceMut<'_>], offset: u64) -> io::Result<usize> {
return crate::io::default_read_vectored(|b| self.read_at(b, offset), bufs);
io::default_read_vectored(|b| self.read_at(b, offset), bufs)
}

pub fn write(&self, buf: &[u8]) -> io::Result<usize> {
Expand Down Expand Up @@ -170,7 +170,7 @@ impl FileDesc {

#[cfg(target_os = "espidf")]
pub fn write_vectored(&self, bufs: &[IoSlice<'_>]) -> io::Result<usize> {
return crate::io::default_write_vectored(|b| self.write(b), bufs);
io::default_write_vectored(|b| self.write(b), bufs)
}

#[inline]
Expand Down Expand Up @@ -222,7 +222,7 @@ impl FileDesc {

#[cfg(target_os = "espidf")]
pub fn write_vectored_at(&self, bufs: &[IoSlice<'_>], offset: u64) -> io::Result<usize> {
return crate::io::default_write_vectored(|b| self.write_at(b, offset), bufs);
io::default_write_vectored(|b| self.write_at(b, offset), bufs)
}

#[cfg(target_os = "linux")]
Expand Down

0 comments on commit 2358f56

Please sign in to comment.