From 21131af61d51cab98da583cf46903f38041670cc Mon Sep 17 00:00:00 2001 From: Frank Steffahn Date: Mon, 14 Nov 2022 20:37:49 +0900 Subject: [PATCH] Remove redundant AsRef/AsMut bounds (#1207) --- 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 {