Skip to content

Commit

Permalink
Rng: impl for unsized RngCore
Browse files Browse the repository at this point in the history
  • Loading branch information
dhardy committed Mar 23, 2018
1 parent 5d14595 commit 96301e4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/distributions/other.rs
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ mod tests {

#[test]
fn test_misc() {
let mut rng: &mut RngCore = &mut ::test::rng(820);
let rng: &mut RngCore = &mut ::test::rng(820);

rng.sample::<char, _>(Uniform);
rng.sample::<bool, _>(Uniform);
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -659,7 +659,7 @@ pub trait Rng: RngCore {
}
}

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

/// Trait for casting types to byte slices
///
Expand Down

0 comments on commit 96301e4

Please sign in to comment.