Skip to content

Commit 89aebdb

Browse files
author
Jonathan Turner
authored
Rollup merge of rust-lang#36977 - Razican:bufreader_typo_fix, r=alexcrichton
Fixed small typo in `BufRead` comments `BufRead` comments, in the `Seek` trait implementation, was talking about allocating 8 *ebibytes*. It was a typo, the correct unit is *exbibytes*, since *ebibytes* don't even exist. The calculation is correct, though.
2 parents 2c8c0de + 8d06332 commit 89aebdb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libstd/io/buffered.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ impl<R: Seek> Seek for BufReader<R> {
231231
if let SeekFrom::Current(n) = pos {
232232
let remainder = (self.cap - self.pos) as i64;
233233
// it should be safe to assume that remainder fits within an i64 as the alternative
234-
// means we managed to allocate 8 ebibytes and that's absurd.
234+
// means we managed to allocate 8 exbibytes and that's absurd.
235235
// But it's not out of the realm of possibility for some weird underlying reader to
236236
// support seeking by i64::min_value() so we need to handle underflow when subtracting
237237
// remainder.

0 commit comments

Comments
 (0)