Skip to content

Commit

Permalink
Remove useless impl
Browse files Browse the repository at this point in the history
(We have automatic derefs.)
  • Loading branch information
dhardy committed Aug 26, 2017
1 parent 2a59377 commit a3f5bf1
Showing 1 changed file with 1 addition and 20 deletions.
21 changes: 1 addition & 20 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -361,27 +361,8 @@ pub trait Rng {
}
}

impl<'a, R: ?Sized> Rng for &'a mut R where R: Rng {
fn next_u32(&mut self) -> u32 {
(**self).next_u32()
}

fn next_u64(&mut self) -> u64 {
(**self).next_u64()
}

#[cfg(feature = "i128_support")]
fn next_u128(&mut self) -> u128 {
(**self).next_u128()
}

fn fill_bytes(&mut self, dest: &mut [u8]) {
(**self).fill_bytes(dest)
}
}

#[cfg(feature="std")]
impl<R: ?Sized> Rng for Box<R> where R: Rng {
impl<R> Rng for Box<R> where R: Rng+?Sized {
fn next_u32(&mut self) -> u32 {
(**self).next_u32()
}
Expand Down

0 comments on commit a3f5bf1

Please sign in to comment.