forgot to add a clear

This commit is contained in:
Numbers
2024-05-21 00:02:11 -04:00
parent 22b6fb6fc5
commit a474488585

View File

@@ -137,6 +137,10 @@ impl<const MAX_LEN: usize, T: Sized> FixedVec<MAX_LEN, T> {
unsafe { core::slice::from_raw_parts(self.buffer.as_ptr() as *const T, self.length) }
}
pub fn clear(&mut self) {
self.length = 0;
}
}
impl<const MAX_LEN: usize, T: Debug> Debug for FixedVec<MAX_LEN, T> {