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

Make crate no_std compatible. #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Demindiro
Copy link

It only required replacing std with core and removing all printlns. The printlns in the benchmarks have been replaced with black_box (which it should have been in the first place because otherwise you're measuring I/O overhead)

Comment on lines 455 to 514
let value = match foo.to_native() {
EndianAwareExample::BigEndianFunction(v) => v,
// TODO this doesn't seem right? It'll cause the assert to always fail.
EndianAwareExample::LittleEndianFunction(_v) => 0,
};
assert_eq!(value, 0x0f000000000000000);
Copy link
Author

Choose a reason for hiding this comment

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

This doesn't seem right to me? If to_native would return LittleEndianFunction on a different platform the test would fail because 0 != 0x0f000000000000000

It only required replacing `std` with `core` and removing all
`println`s.
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.

1 participant