Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
BlockRng: remove bound on <G as Generator>::Output in Debug impl
  • Loading branch information
dhardy committed Nov 30, 2025
commit 84c23d885c7999241de5673e7f816ca6b198e3d1
6 changes: 2 additions & 4 deletions src/block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,10 @@ pub struct BlockRng<G: Generator> {
}

// Custom Debug implementation that does not expose the contents of `results`.
impl<const N: usize, G: Generator<Output = [u32; N]> + fmt::Debug> fmt::Debug for BlockRng<G> {
impl<G: Generator + fmt::Debug> fmt::Debug for BlockRng<G> {
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
fmt.debug_struct("BlockRng")
.field("core", &self.core)
.field("result_len", &self.results.as_ref().len())
.field("index", &self.index)
.finish()
}
Expand Down Expand Up @@ -273,11 +272,10 @@ pub struct BlockRng64<G: Generator + ?Sized> {
}

// Custom Debug implementation that does not expose the contents of `results`.
impl<const N: usize, G: Generator<Output = [u64; N]> + fmt::Debug> fmt::Debug for BlockRng64<G> {
impl<G: Generator + fmt::Debug> fmt::Debug for BlockRng64<G> {
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
fmt.debug_struct("BlockRng64")
.field("core", &self.core)
.field("result_len", &self.results.as_ref().len())
.field("index", &self.index)
.field("half_used", &self.half_used)
.finish()
Expand Down