Skip to content

Commit

Permalink
Merge pull request #105 from dtolnay/debug
Browse files Browse the repository at this point in the history
Implement Debug for DistributedSlice
  • Loading branch information
dtolnay authored Nov 12, 2024
2 parents 310fb2b + 9156041 commit 23f271c
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/distributed_slice.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use core::fmt::{self, Debug};
use core::hint;
use core::mem;
use core::ops::Deref;
Expand Down Expand Up @@ -301,3 +302,12 @@ impl<T: 'static> IntoIterator for DistributedSlice<[T]> {
self.static_slice().iter()
}
}

impl<T> Debug for DistributedSlice<[T]>
where
T: Debug + 'static,
{
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
Debug::fmt(self.static_slice(), formatter)
}
}

0 comments on commit 23f271c

Please sign in to comment.