Skip to content
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

Update to new to/from_bytes functions #146

Closed
wants to merge 4 commits into from

Conversation

vjackson725
Copy link
Contributor

Due to rust-lang/rust#51919, to/from_bytes has been renamed to to/from_ne_bytes. This pull request renames all occurrences to be in line with that.

Additionally, I changed the newlib generator to give a helpful error message when it's missing qemu-arm.

@@ -12,7 +12,7 @@ lazy_static! {
.map(|chunk| {
let mut buf = [0; 4];
buf.copy_from_slice(chunk);
f32::from_bits(u32::from_le(u32::from_bytes(buf)))
f32::from_bits(u32::from_le(u32::from_ne_bytes(buf)))
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's the function u32::from_le_bytes which is exactly the combination of u32::from_le and u32::from_ne_bytes. :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tbu- indeed, I just did a find&replace. Fixed now.

@alexcrichton
Copy link
Member

Thanks for the PR and sorry for the delay, but this has been updated on master now so I'm going to close this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants