summary refs log tree commit diff
path: root/library/std/src/sys
diff options
context:
space:
mode:
authorThom Chiovoloni <thom@shift.click>2023-07-28 18:09:12 -0700
committerThom Chiovoloni <thom@shift.click>2023-07-28 18:09:12 -0700
commit558f49d7aae7142864ee98fb26e593c12c1a3cd3 (patch)
treed245fbaf4a4c078158ccfb2ad522c8594da6fc67 /library/std/src/sys
parent04abc370b9f3855b28172b65a7f7d5a433f41412 (diff)
downloadrust-558f49d7aae7142864ee98fb26e593c12c1a3cd3.tar.gz
rust-558f49d7aae7142864ee98fb26e593c12c1a3cd3.zip
inline trivial (noop) flush calls
Diffstat (limited to 'library/std/src/sys')
-rw-r--r--library/std/src/sys/hermit/fs.rs1
-rw-r--r--library/std/src/sys/unix/fs.rs1
-rw-r--r--library/std/src/sys/unix/stdio.rs2
3 files changed, 4 insertions, 0 deletions
diff --git a/library/std/src/sys/hermit/fs.rs b/library/std/src/sys/hermit/fs.rs
index 4bb735668d2..6aa4ea7f5b4 100644
--- a/library/std/src/sys/hermit/fs.rs
+++ b/library/std/src/sys/hermit/fs.rs
@@ -335,6 +335,7 @@ impl File {
         false
     }
 
+    #[inline]
     pub fn flush(&self) -> io::Result<()> {
         Ok(())
     }
diff --git a/library/std/src/sys/unix/fs.rs b/library/std/src/sys/unix/fs.rs
index fbc7f04ce9a..625f351fdef 100644
--- a/library/std/src/sys/unix/fs.rs
+++ b/library/std/src/sys/unix/fs.rs
@@ -1227,6 +1227,7 @@ impl File {
         self.0.write_vectored_at(bufs, offset)
     }
 
+    #[inline]
     pub fn flush(&self) -> io::Result<()> {
         Ok(())
     }
diff --git a/library/std/src/sys/unix/stdio.rs b/library/std/src/sys/unix/stdio.rs
index a26f20795a1..97e75f1b5b6 100644
--- a/library/std/src/sys/unix/stdio.rs
+++ b/library/std/src/sys/unix/stdio.rs
@@ -54,6 +54,7 @@ impl io::Write for Stdout {
         true
     }
 
+    #[inline]
     fn flush(&mut self) -> io::Result<()> {
         Ok(())
     }
@@ -81,6 +82,7 @@ impl io::Write for Stderr {
         true
     }
 
+    #[inline]
     fn flush(&mut self) -> io::Result<()> {
         Ok(())
     }