summaryrefslogtreecommitdiffstats
path: root/vendor/zerovec/src/flexzerovec/slice.rs
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/zerovec/src/flexzerovec/slice.rs')
-rw-r--r--vendor/zerovec/src/flexzerovec/slice.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/vendor/zerovec/src/flexzerovec/slice.rs b/vendor/zerovec/src/flexzerovec/slice.rs
index ee164d05b..fb58d6215 100644
--- a/vendor/zerovec/src/flexzerovec/slice.rs
+++ b/vendor/zerovec/src/flexzerovec/slice.rs
@@ -22,6 +22,12 @@ pub struct FlexZeroSlice {
data: [u8],
}
+impl fmt::Debug for FlexZeroSlice {
+ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+ self.to_vec().fmt(f)
+ }
+}
+
impl PartialEq for FlexZeroSlice {
fn eq(&self, other: &Self) -> bool {
self.width == other.width && self.data == other.data
@@ -507,12 +513,6 @@ impl FlexZeroSlice {
}
}
-impl fmt::Debug for &FlexZeroSlice {
- fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
- write!(f, "{:?}", self.to_vec())
- }
-}
-
#[inline]
pub(crate) fn get_item_width(item_bytes: &[u8; USIZE_WIDTH]) -> usize {
USIZE_WIDTH - item_bytes.iter().rev().take_while(|b| **b == 0).count()