Skip to content

Commit 96301e4

Browse files
committed
Rng: impl for unsized RngCore
1 parent 5d14595 commit 96301e4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/distributions/other.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ mod tests {
165165

166166
#[test]
167167
fn test_misc() {
168-
let mut rng: &mut RngCore = &mut ::test::rng(820);
168+
let rng: &mut RngCore = &mut ::test::rng(820);
169169

170170
rng.sample::<char, _>(Uniform);
171171
rng.sample::<bool, _>(Uniform);

src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -659,7 +659,7 @@ pub trait Rng: RngCore {
659659
}
660660
}
661661

662-
impl<R: RngCore> Rng for R {}
662+
impl<R: RngCore + ?Sized> Rng for R {}
663663

664664
/// Trait for casting types to byte slices
665665
///

0 commit comments

Comments
 (0)