-
Notifications
You must be signed in to change notification settings - Fork 432
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
Fix next_u64_via_fill to use little endian order #1026
Comments
A first step could be adding tests for |
These methods are only used twice: in let v = [0u8, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 3];
let mut rng = ReadRng::new(&v[..]);
assert_eq!(rng.next_u32(), 1_u32.to_be());
assert_eq!(rng.next_u32(), 2_u32.to_be());
assert_eq!(rng.next_u32(), 3_u32.to_be()); Thus, currently on an LE platform the number if read in with only the most significant byte set, and the comparator gets a byte-swap. On BE, the number is read in with the least-significant byte set and the comparator does not get a byte-swap. Thus the tests pass but are wrong. |
Fixing this properly requires bumping the Alternatively we could just call it a bug-fix and note that basically no-one is affected (though we don't really know). |
I think if we're doing |
Agreed, we should just fix this for v0.6. |
Okay, I'll try to get this done today. |
See: #1011 (comment)
The text was updated successfully, but these errors were encountered: