Skip to content

Commit

Permalink
Rollup merge of #131462 - cuviper:open_buffered-error, r=RalfJung
Browse files Browse the repository at this point in the history
Mention allocation errors for `open_buffered`

This documents that `File::open_buffered` may return an error on allocation failure.
  • Loading branch information
matthiaskrgr authored Oct 9, 2024
2 parents 866869b + 7b52e6b commit 7a76489
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion library/std/src/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7a76489

Please sign in to comment.