Skip to content

Commit 2e01bbb

Browse files
committed
Rng: impl for unsized RngCore
1 parent ef1e824 commit 2e01bbb

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
@@ -640,7 +640,7 @@ pub trait Rng: RngCore {
640640
}
641641
}
642642

643-
impl<R: RngCore> Rng for R {}
643+
impl<R: RngCore + ?Sized> Rng for R {}
644644

645645
/// Trait for casting types to byte slices
646646
///

0 commit comments

Comments
 (0)