Skip to content

Commit

Permalink
Remove redundant AsRef/AsMut bounds (#1207)
Browse files Browse the repository at this point in the history
  • Loading branch information
steffahn authored Nov 14, 2022
1 parent 8339afc commit 21131af
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
10 changes: 2 additions & 8 deletions rand_core/src/block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -178,10 +178,7 @@ impl<R: BlockRngCore> BlockRng<R> {
}
}

impl<R: BlockRngCore<Item = u32>> RngCore for BlockRng<R>
where
<R as BlockRngCore>::Results: AsRef<[u32]> + AsMut<[u32]>,
{
impl<R: BlockRngCore<Item = u32>> RngCore for BlockRng<R> {
#[inline]
fn next_u32(&mut self) -> u32 {
if self.index >= self.results.as_ref().len() {
Expand Down Expand Up @@ -346,10 +343,7 @@ impl<R: BlockRngCore> BlockRng64<R> {
}
}

impl<R: BlockRngCore<Item = u64>> RngCore for BlockRng64<R>
where
<R as BlockRngCore>::Results: AsRef<[u64]> + AsMut<[u64]>,
{
impl<R: BlockRngCore<Item = u64>> RngCore for BlockRng64<R> {
#[inline]
fn next_u32(&mut self) -> u32 {
let mut index = self.index - self.half_used as usize;
Expand Down
1 change: 0 additions & 1 deletion src/rngs/adapter/reseeding.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ where
impl<R, Rsdr: RngCore> RngCore for ReseedingRng<R, Rsdr>
where
R: BlockRngCore<Item = u32> + SeedableRng,
<R as BlockRngCore>::Results: AsRef<[u32]> + AsMut<[u32]>,
{
#[inline(always)]
fn next_u32(&mut self) -> u32 {
Expand Down

0 comments on commit 21131af

Please sign in to comment.