Skip to content

Commit

Permalink
Relax Sized bound on Distribution<T> for &D (#1278)
Browse files Browse the repository at this point in the history
  • Loading branch information
ChayimFriedman2 authored Jan 4, 2023
1 parent e97b5b6 commit 3107a54
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/distributions/distribution.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ pub trait Distribution<T> {
}
}

impl<'a, T, D: Distribution<T>> Distribution<T> for &'a D {
impl<'a, T, D: Distribution<T> + ?Sized> Distribution<T> for &'a D {
fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> T {
(*self).sample(rng)
}
Expand Down

0 comments on commit 3107a54

Please sign in to comment.