-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
std::io::Cursor::position behavior changed in the beta #47640
Comments
Not sure it's the Seems like |
Thanks for the report @pietroalbini! @3Hren will this be difficult to update for you? I do think I agree that both cases are the same here in terms of correctness, but if it's difficult to update we could consider reverting. The issue here I think can be boiled down to: use std::io::{Cursor, Read};
fn main() {
let mut io = Cursor::new(&[1, 2][..]);
assert!(io.read_exact(&mut [0; 4]).is_err());
println!("{}", io.position());
} This currently prints 2 on stable (1.23.0) and 0 on beta. A side effect of #46485 is that a call to |
It's okay for me, no need for reverting :) |
Ok! I'll bring this up with @rust-lang/libs team soon as well, but we're pretty likely to close this. |
The libs team discussed this today and concluded to close, but thanks regardless for the report @pietroalbini and the willingness to update @3Hren! |
Seems like the behavior of
std::io::Cursor::position
changed, because the test suite of rmp now fails on beta and nightly while working fine on stable (crater log). One example of such an error:My guess is this regression is related to #46485, which is the only pull request that changed the behavior for
Cursor<&[u8]>
.cc @3Hren
The text was updated successfully, but these errors were encountered: