Skip to content

Commit 6f123c1

Browse files
committed
Workaround never constructed and never used warning.
`rustc` complains that `error: struct MyRng is never constructed`. Construct it, and use it.
1 parent 4df037d commit 6f123c1

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

rand_core/src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,9 @@ pub trait SeedableRng: Sized {
288288
/// MyRng(seed)
289289
/// }
290290
/// }
291+
///
292+
/// # let rng = MyRng::from_seed(Default::default());
293+
/// # let _ = rng.0;
291294
/// ```
292295
type Seed: Sized + Default + AsMut<[u8]>;
293296

0 commit comments

Comments
 (0)