Closed
Description
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:
#[test]
fn from_str32_read_str_len_eof() {
let buf: &[u8] = &[0xdb, 0x00, 0x00, 0x00];
let mut cur = Cursor::new(buf);
read_str_len(&mut cur).err().unwrap();
assert_eq!(4, cur.position());
}
---- func::decode::string::from_str32_read_str_len_eof stdout ----
thread 'func::decode::string::from_str32_read_str_len_eof' panicked at 'assertion failed: `(left == right)`
left: `4`,
right: `1`', rmp/tests/func/decode/string.rs:120:5
My guess is this regression is related to #46485, which is the only pull request that changed the behavior for Cursor<&[u8]>
.
cc @3Hren