-
Notifications
You must be signed in to change notification settings - Fork 49
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
Implement no_std support #34
Conversation
What I don't quite like is that I needed to add the feature at all. Since it doesn't really do anything, there shouldn't be any need for it. But examples in docs are apparently not compiled with cfg(test), so they are compiled without std, which then makes them complain that no global allocator is set. This is really stupid and should honestly be fixed in Rust's testing framework. |
So, is the purpose of the feature only so the doc tests can pass? If so, maybe we just make the feature semi-private, like |
I removed the feature entirely now. It's really just a bug in Rust's test framework and interestingly it still runs all of the tests and ends up returning a successful exit code regardless of it printing an error. And it seems like on nightly the bug is fixed anyway. So I'd say it's not worth adding a feature. |
2735b2d
to
a3b01ca
Compare
This implements no_std support for unicase. It adds a feature called `std` which is activated by default. no_std support has been implemented for every Rust version starting with 1.36 which added stable support for the alloc crate. All of unicase's features are available on no_std.
Rebased onto latest master. |
What's the status of this PR? It's good to go from my side. |
Can this be merged? I'm beginning to get blocked by this soon. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, sorry for forgetting about this!
Thank you so much. Considering there's also not a lot going on in this repository (as unicase is in a fairly stable shape), would you mind creating a release for this as well? (Otherwise I fear it could possibly take quite a long time for another release). |
This implements no_std support for unicase. It adds a feature called
std
which is activated by default. no_std support has been implemented for every Rust version starting with 1.36 which added stable support for the alloc crate. All of unicase's features are available on no_std.