From f4043b9cd0def3939e2904415626071b945b0b3e Mon Sep 17 00:00:00 2001 From: xavo95 Date: Sun, 12 Jan 2025 19:45:29 +0100 Subject: [PATCH] Improvements --- src/t_array.rs | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/t_array.rs b/src/t_array.rs index 1b73442..8b76f4e 100644 --- a/src/t_array.rs +++ b/src/t_array.rs @@ -15,10 +15,10 @@ type TArrayResize = fn(ptr: usize, len: u32); static T_ARRAY_RESIZE_GROW: OnceLock = OnceLock::new(); pub struct TArray { - pub(crate) ptr: *const u8, - pub(crate) data_ptr: u64, - pub(crate) len: u32, - pub(crate) cap: u32, + pub ptr: *const u8, + pub data_ptr: u64, + pub len: u32, + pub cap: u32, } impl TArray { @@ -36,10 +36,6 @@ impl TArray { } } - pub fn capacity(&self) -> u32 { - self.cap - } - pub fn clear(&mut self) { if self.data_ptr != 0 && self.len > 0 { let data = unsafe {