Skip to content

Implement size_hint for BufReader #81052

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 20 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add dyn for SizeHint cast
  • Loading branch information
Xavientois committed Jan 16, 2021
commit af4be91920fb50226e18fb4f605514ecc76cb2f7
2 changes: 1 addition & 1 deletion library/std/src/io/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2472,7 +2472,7 @@ impl<R: Read> Iterator for Bytes<R> {
}

default fn size_hint(&self) -> (usize, Option<usize>) {
(&self.inner as &SizeHint).size_hint()
(&self.inner as &dyn SizeHint).size_hint()
}
}

Expand Down