Skip to content

Commit

Permalink
Implement Debug for DistributedSlice
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Nov 12, 2024
1 parent 310fb2b commit 9156041
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 9156041

Please sign in to comment.