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 to_str no_std compatible #40

Merged
merged 1 commit into from
Jun 21, 2024
Merged

Make to_str no_std compatible #40

merged 1 commit into from
Jun 21, 2024

Conversation

3541
Copy link
Contributor

@3541 3541 commented Jun 16, 2024

The &'static str-related methods in to_str do not require std, but cannot currently be used because they are mixed in with use of String and to_string().

This patch allows the use of the (applicable subset of the) to_str module possible under no_std with or without the alloc crate.

To this end, a new feature flag for alloc is introduced (implied by std). All use of String in to_str is gated behind the alloc feature.

This patch allows the use of the (applicable subset of the) to_str
module possible under no_std with or without the alloc crate.

To this end, a new feature flag for alloc is introduced (implied by
std). All use of String in to_str is gated behind the alloc feature.
@cole14 cole14 merged commit db692ee into cole14:master Jun 21, 2024
3 checks passed
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