From 74e0e45f3c32aef30ab5cdb7bf1980eb087830de Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Mon, 10 May 2021 12:56:35 +0100 Subject: [PATCH] io::Seek: Mention that seeking can fail due to buffer flush fail Signed-off-by: Ian Jackson --- library/std/src/io/mod.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/library/std/src/io/mod.rs b/library/std/src/io/mod.rs index 94c70c4f267..110cb86498e 100644 --- a/library/std/src/io/mod.rs +++ b/library/std/src/io/mod.rs @@ -1663,6 +1663,8 @@ pub trait Seek { /// /// # Errors /// + /// Seeking can fail, for example becaue it might involve flushing a buffer. + /// /// Seeking to a negative offset is considered an error. #[stable(feature = "rust1", since = "1.0.0")] fn seek(&mut self, pos: SeekFrom) -> Result;