From 116d75a77067f0ec58521375f8923c0ac3ac9a60 Mon Sep 17 00:00:00 2001 From: Frank Steffahn Date: Sun, 26 Dec 2021 17:20:42 +0100 Subject: [PATCH] Remove redundant AsRef/AsMut bounds --- rand_core/src/block.rs | 10 ++-------- src/rngs/adapter/reseeding.rs | 1 - 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/rand_core/src/block.rs b/rand_core/src/block.rs index d311b68cfe6..a527dda2971 100644 --- a/rand_core/src/block.rs +++ b/rand_core/src/block.rs @@ -178,10 +178,7 @@ impl BlockRng { } } -impl> RngCore for BlockRng -where - ::Results: AsRef<[u32]> + AsMut<[u32]>, -{ +impl> RngCore for BlockRng { #[inline] fn next_u32(&mut self) -> u32 { if self.index >= self.results.as_ref().len() { @@ -346,10 +343,7 @@ impl BlockRng64 { } } -impl> RngCore for BlockRng64 -where - ::Results: AsRef<[u64]> + AsMut<[u64]>, -{ +impl> RngCore for BlockRng64 { #[inline] fn next_u32(&mut self) -> u32 { let mut index = self.index - self.half_used as usize; diff --git a/src/rngs/adapter/reseeding.rs b/src/rngs/adapter/reseeding.rs index ae3fcbb2fc2..5ab453c928e 100644 --- a/src/rngs/adapter/reseeding.rs +++ b/src/rngs/adapter/reseeding.rs @@ -113,7 +113,6 @@ where impl RngCore for ReseedingRng where R: BlockRngCore + SeedableRng, - ::Results: AsRef<[u32]> + AsMut<[u32]>, { #[inline(always)] fn next_u32(&mut self) -> u32 {