We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
For example:
use std::io::{Cursor, Read}; fn main() { let mut reader = Cursor::new( b"A".to_owned() ).chain( Cursor::new(b"B".to_owned()) ); reader.read(&mut []).unwrap(); let mut s = String::new(); reader.read_to_string(&mut s).unwrap(); assert_eq!("AB", s); }
Results in:
thread 'main' panicked at 'assertion failed: `(left == right)` (left: `"AB"`, right: `"B"`)'
The text was updated successfully, but these errors were encountered:
Auto merge of #36777 - tmiasko:chain-read-eof, r=alexcrichton
4f79716
[std::io::Chain] Mark first as done only when reading into non-zero length buffer. Fixes #36771.
No branches or pull requests
For example:
Results in:
The text was updated successfully, but these errors were encountered: