From fd2384b7fab14732efde99da8affd830e2334e16 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Fri, 1 May 2020 18:46:23 +0200 Subject: Nightly stuff --- safe_libc/src/stdio.rs | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) (limited to 'safe_libc/src/stdio.rs') diff --git a/safe_libc/src/stdio.rs b/safe_libc/src/stdio.rs index 2d19725..be016ab 100644 --- a/safe_libc/src/stdio.rs +++ b/safe_libc/src/stdio.rs @@ -41,28 +41,17 @@ pub fn stderr() -> Stderr { impl BasicOStream { #[inline] pub fn flush(&mut self) -> Result<()> { - check_io(unsafe { - libc::fflush(self.0) - } == 0) + check_io(unsafe { libc::fflush(self.0) } == 0) } #[inline] pub fn write(&mut self, b: &[u8]) -> Result<()> { - check_io(unsafe { - libc::fwrite( - b.as_ptr().cast(), - 1, - b.len(), - self.0, - ) - } == b.len()) + check_io(unsafe { libc::fwrite(b.as_ptr().cast(), 1, b.len(), self.0) } == b.len()) } #[inline] pub fn puts(&mut self, s: &string::CStr) -> Result<()> { - check_io(unsafe { - libc::fputs(s.as_ptr(), self.0) - } != libc::EOF) + check_io(unsafe { libc::fputs(s.as_ptr(), self.0) } != libc::EOF) } } -- cgit v1.2.3