random: add tracking issue, address other comments
This commit is contained in:
parent
a21ff017f4
commit
e94dd9b712
4 changed files with 19 additions and 14 deletions
|
|
@ -394,7 +394,7 @@ pub mod panicking;
|
|||
#[unstable(feature = "core_pattern_types", issue = "123646")]
|
||||
pub mod pat;
|
||||
pub mod pin;
|
||||
#[unstable(feature = "random", issue = "none")]
|
||||
#[unstable(feature = "random", issue = "130703")]
|
||||
pub mod random;
|
||||
#[unstable(feature = "new_range_api", issue = "125687")]
|
||||
pub mod range;
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
//! given [`RandomSource`].
|
||||
|
||||
/// A source of randomness.
|
||||
#[unstable(feature = "random", issue = "none")]
|
||||
#[unstable(feature = "random", issue = "130703")]
|
||||
pub trait RandomSource {
|
||||
/// Fills `bytes` with random bytes.
|
||||
fn fill_bytes(&mut self, bytes: &mut [u8]);
|
||||
|
|
@ -17,7 +17,7 @@ pub trait RandomSource {
|
|||
/// distribution, so a value of 1 is just as likely as [`i32::MAX`]. By using
|
||||
/// modulo operations, some of the resulting values can become more likely than
|
||||
/// others. Use audited crates when in doubt.
|
||||
#[unstable(feature = "random", issue = "none")]
|
||||
#[unstable(feature = "random", issue = "130703")]
|
||||
pub trait Random: Sized {
|
||||
/// Generates a random value.
|
||||
fn random(source: &mut (impl RandomSource + ?Sized)) -> Self;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue