Skip to content
This repository was archived by the owner on Apr 28, 2025. It is now read-only.

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.

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants