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

Merged
merged 1 commit into from
May 10, 2025

Conversation

jaybosamiya-ms
Copy link
Contributor

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.

@tmfink tmfink merged commit 318d8b2 into capstone-rust:master May 10, 2025
13 of 16 checks passed
@tmfink
Copy link
Member

tmfink commented May 10, 2025

thanks for the PR!

@jaybosamiya-ms jaybosamiya-ms deleted the remove-forced-allocator branch May 12, 2025 20:34
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.

2 participants