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 21, 2018
1 parent ef1e824 commit 2e01bbb
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 @@ -640,7 +640,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 2e01bbb

Please sign in to comment.