From c13a62593c218243b4d3b0e8be0b903c0315571b Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Thu, 23 Jan 2014 09:53:05 -0800 Subject: Flag Result as #[must_use] and deal with fallout. --- src/libstd/io/fs.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/libstd/io') diff --git a/src/libstd/io/fs.rs b/src/libstd/io/fs.rs index cb98ff21105..8904101dd05 100644 --- a/src/libstd/io/fs.rs +++ b/src/libstd/io/fs.rs @@ -175,7 +175,7 @@ impl File { /// /// This function will raise on the `io_error` condition on failure. pub fn fsync(&mut self) { - self.fd.fsync().map_err(|e| io_error::cond.raise(e)); + let _ = self.fd.fsync().map_err(|e| io_error::cond.raise(e)); } /// This function is similar to `fsync`, except that it may not synchronize @@ -187,7 +187,7 @@ impl File { /// /// This function will raise on the `io_error` condition on failure. pub fn datasync(&mut self) { - self.fd.datasync().map_err(|e| io_error::cond.raise(e)); + let _ = self.fd.datasync().map_err(|e| io_error::cond.raise(e)); } /// Either truncates or extends the underlying file, updating the size of @@ -203,7 +203,7 @@ impl File { /// /// On error, this function will raise on the `io_error` condition. pub fn truncate(&mut self, size: i64) { - self.fd.truncate(size).map_err(|e| io_error::cond.raise(e)); + let _ = self.fd.truncate(size).map_err(|e| io_error::cond.raise(e)); } /// Tests whether this stream has reached EOF. -- cgit 1.4.1-3-g733a5