From a474488585a2dcfe9669573d42a379f953df38a2 Mon Sep 17 00:00:00 2001 From: Numbers Date: Tue, 21 May 2024 00:02:11 -0400 Subject: [PATCH] forgot to add a clear --- src/data.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/data.rs b/src/data.rs index 2e9cc77..79b4428 100644 --- a/src/data.rs +++ b/src/data.rs @@ -137,6 +137,10 @@ impl FixedVec { unsafe { core::slice::from_raw_parts(self.buffer.as_ptr() as *const T, self.length) } } + pub fn clear(&mut self) { + self.length = 0; + } + } impl Debug for FixedVec {