diff options
Diffstat (limited to 'vendor/zerovec/src/varzerovec/components.rs')
-rw-r--r-- | vendor/zerovec/src/varzerovec/components.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/vendor/zerovec/src/varzerovec/components.rs b/vendor/zerovec/src/varzerovec/components.rs index bf70c83c5..ff26d9029 100644 --- a/vendor/zerovec/src/varzerovec/components.rs +++ b/vendor/zerovec/src/varzerovec/components.rs @@ -85,7 +85,7 @@ unsafe impl VarZeroVecFormat for Index16 { unsafe impl VarZeroVecFormat for Index32 { const INDEX_WIDTH: usize = 4; - const MAX_VALUE: u32 = u32::MAX as u32; + const MAX_VALUE: u32 = u32::MAX; type RawBytes = RawBytesULE<4>; #[inline] fn rawbytes_to_usize(raw: Self::RawBytes) -> usize { @@ -110,6 +110,7 @@ unsafe impl VarZeroVecFormat for Index32 { /// exist. /// /// See [`VarZeroVecComponents::parse_byte_slice()`] for information on the internal invariants involved +#[derive(Debug)] pub struct VarZeroVecComponents<'a, T: ?Sized, F> { /// The number of elements len: u32, @@ -197,7 +198,7 @@ impl<'a, T: VarULE + ?Sized, F: VarZeroVecFormat> VarZeroVecComponents<'a, T, F> .ok_or(ZeroVecError::VarZeroVecFormatError)?; let borrowed = VarZeroVecComponents { - len: len as u32, + len, indices: indices_bytes, things, entire_slice: slice, @@ -392,7 +393,7 @@ impl<'a, T: VarULE + ?Sized, F: VarZeroVecFormat> VarZeroVecComponents<'a, T, F> .copied() .map(F::rawbytes_to_usize) .collect::<Vec<_>>(); - format!("VarZeroVecComponents {{ indices: {:?} }}", indices) + format!("VarZeroVecComponents {{ indices: {indices:?} }}") } } |