From db9377d33aa35a223a0d0c1aa7c40192da134cc9 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Wed, 9 Oct 2024 12:43:23 -0700 Subject: [PATCH] Mention allocation errors for `open_buffered` --- std/src/fs.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/std/src/fs.rs b/std/src/fs.rs index 124ef121b186c..675140ff18f5f 100644 --- a/std/src/fs.rs +++ b/std/src/fs.rs @@ -394,7 +394,8 @@ impl File { /// /// # Errors /// - /// This function will return an error if `path` does not already exist. + /// This function will return an error if `path` does not already exist, + /// or if memory allocation fails for the new buffer. /// Other errors may also be returned according to [`OpenOptions::open`]. /// /// # Examples