diff --git a/rand_core/src/lib.rs b/rand_core/src/lib.rs index 9a6b39d3228..291edd4daaa 100644 --- a/rand_core/src/lib.rs +++ b/rand_core/src/lib.rs @@ -297,17 +297,13 @@ pub trait SeedableRng: Sized { /// ``` /// use rand_core::SeedableRng; /// - /// pub struct MyRngSeed(pub [u8; 64]); + /// const N: usize = 64; + /// pub struct MyRngSeed(pub [u8; N]); /// pub struct MyRng(MyRngSeed); /// /// impl Default for MyRngSeed { /// fn default() -> MyRngSeed { - /// MyRngSeed([ - /// 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - /// 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - /// 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - /// 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - /// ]) + /// MyRngSeed([0; N]) /// } /// } ///