From 18b1b08ca3e2cd40e2723c5357006d63ce5bc1ac Mon Sep 17 00:00:00 2001 From: James Date: Sun, 30 Jul 2023 14:32:04 -0700 Subject: [PATCH 1/2] doc: add std and alloc to feature section of readme --- README.md | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index c944dbd..9042ea5 100644 --- a/README.md +++ b/README.md @@ -126,12 +126,17 @@ released at least six months ago. The current MSRV is 1.65.0. Note that the MSRV is not increased automatically, and only as part of a minor release. -## Feature flags +## `std` and other Feature flags -There is support for a number of crates. These are enabled by setting the identically -named feature flag. +Uint enables the `std` feature by default, and can be used in `no_std` +environments by disabling default features. For environments with allocators +but without `std`, the `alloc` feature flag enables use of collections, `String`, and `Vec` without `std`. + +In addition to `std` and `alloc`, feature flags enable support for a number of +crates. These are enabled by setting the identically named feature flag. * `unstable` Enable sem-ver unstable features. +* `std`: * [`rand`](https://docs.rs/rand): Implements sampling from the [`Standard`](https://docs.rs/rand/latest/rand/distributions/struct.Standard.html) distribution, i.e. [`rng.gen()`](https://docs.rs/rand/latest/rand/trait.Rng.html#method.gen). * [`arbitrary`](https://docs.rs/arbitrary): Implements the [`Arbitrary`](https://docs.rs/arbitrary/latest/arbitrary/trait.Arbitrary.html) trait, allowing [`Uint`]s to be generated for fuzz testing. * [`quickcheck`](https://docs.rs/quickcheck): Implements the [`Arbitrary`](https://docs.rs/quickcheck/latest/quickcheck/trait.Arbitrary.html) trait, allowing [`Uint`]s to be generated for property based testing. From 6ce2fb80855236aa31a79bf9c16875a82d2fe6e6 Mon Sep 17 00:00:00 2001 From: James Date: Sun, 30 Jul 2023 14:34:23 -0700 Subject: [PATCH 2/2] doc: formatting --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 9042ea5..6dc3d7e 100644 --- a/README.md +++ b/README.md @@ -128,9 +128,9 @@ release. ## `std` and other Feature flags -Uint enables the `std` feature by default, and can be used in `no_std` -environments by disabling default features. For environments with allocators -but without `std`, the `alloc` feature flag enables use of collections, `String`, and `Vec` without `std`. +Uint enables the `std` feature by default. It can be used in `no_std` +environments by disabling default features. For environments with allocators +but without `std`, the `alloc` feature flag enables use of collections,`String`, and `Vec` without `std`. In addition to `std` and `alloc`, feature flags enable support for a number of crates. These are enabled by setting the identically named feature flag.