Skip to content

Commit

Permalink
Improve rewind documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
seanlinsley authored Oct 16, 2023
1 parent 98c1e3d commit 1fb0033
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions library/std/src/io/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -556,6 +556,10 @@ where
/// therefore, using something that implements [`BufRead`], such as
/// [`BufReader`], will be more efficient.
///
/// Repeated calls to the reader use the same cursor, so for example
/// calling `read_to_end` twice on a [`File`] will only return the file's
/// contents once. It's recommended to first call `rewind()` in that case.
///
/// # Examples
///
/// [`File`]s implement `Read`:
Expand Down

0 comments on commit 1fb0033

Please sign in to comment.