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

Add "alloc" feature #1

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Add "alloc" feature #1

wants to merge 2 commits into from

Conversation

Kijewski
Copy link

@Kijewski Kijewski commented Apr 2, 2024

  • In a doc test, #[test]s are not executed. This change makes sure the tests are executed by removing the #[test] annotation. Also, the doc test is gated in #[cfg(feature = "std"], because it uses Boxes.

  • The library does not actually need any features found in std. Using alloc will suffice. The feature std is not removed, so the library:

    • remains backward compatible to downstream users who explicitly use features = ["std"],
    • remains forward compatible in case you want to / need to depend on features only found in std at a later time.

In a doc test, `#[test]`s are not executed.

This change makes sure the tests are executed by removing the `#[test]`
annotation. Also, the doc test is gated in `#[cfg(feature = "std"]`,
because it uses `Box`es.
The library does not actually need any features found in `std`. Using
`alloc` will suffice.

The feature `std` is not removed, so the library:

* remains backward compatible to downstream users who explicitly use
  `features = ["std"]`,
* remains forward compatible in case you want to / need to depend on
  features only found in `std` at a later time.
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