Skip to content

Fix accidentally forced std/allocator on no_std #171

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

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

Conversation

jaybosamiya-ms
Copy link

The cfg config for std/ALLOCATOR might be accidentally too permissive.

Specifically, as it currently stands:

#[cfg(any(test, not(feature = "std")))]
#[macro_use]
extern crate std;

This code brings in std even if the feature std is not enabled (because any would hold true if even one of the two conditions is true). Similarly, for ALLOCATOR.

By changing it to all instead of any, it is only applicable for tests for non-std configuration, which is what I believe the intention is here.

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