Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
noslaver committed Mar 24, 2021
1 parent 399c8cc commit 5161f70
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Cargo.toml
Expand Up @@ -41,7 +41,8 @@ std_rng = ["rand_chacha", "rand_hc"]
# Option: enable SmallRng
small_rng = []

# Option: enable generating random arrays of any size using min-const-generics
# Option: for rustc ≥ 1.51, enable generating random arrays of any size
# using min-const-generics
min_const_gen = []

[workspace]
Expand Down
4 changes: 4 additions & 0 deletions src/distributions/mod.rs
Expand Up @@ -281,6 +281,10 @@ where
/// types and tends to be faster for `u32` and smaller types.
/// When using `rustc` ≥ 1.51, enable the `min_const_gen` feature to support
/// arrays larger than 32 elements.
/// Note that [`Rng::fill`] and `Standard`'s array support are *not* equivalent:
/// the former is optimised for integer types (using fewer RNG calls for
/// element types smaller than the RNG word size), while the latter supports
/// any element type supported by `Standard`.
/// * `Option<T>` first generates a `bool`, and if true generates and returns
/// `Some(value)` where `value: T`, otherwise returning `None`.
///
Expand Down

0 comments on commit 5161f70

Please sign in to comment.