Skip to content

Commit

Permalink
Rollup merge of #36977 - Razican:bufreader_typo_fix, r=alexcrichton
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Jonathan Turner committed Oct 6, 2016
2 parents 2c8c0de + 8d06332 commit 89aebdb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libstd/io/buffered.rs
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ impl<R: Seek> Seek for BufReader<R> {
if let SeekFrom::Current(n) = pos {
let remainder = (self.cap - self.pos) as i64;
// it should be safe to assume that remainder fits within an i64 as the alternative
// means we managed to allocate 8 ebibytes and that's absurd.
// means we managed to allocate 8 exbibytes and that's absurd.
// But it's not out of the realm of possibility for some weird underlying reader to
// support seeking by i64::min_value() so we need to handle underflow when subtracting
// remainder.
Expand Down

0 comments on commit 89aebdb

Please sign in to comment.