diff --git a/src/string/MyStr_strict.rs b/src/string/MyStr_strict.rs index 8a70cc1..0476949 100644 --- a/src/string/MyStr_strict.rs +++ b/src/string/MyStr_strict.rs @@ -12,3 +12,20 @@ pub struct Str { _size: usize, _capacity: usize, } + +impl Str { + pub fn new() -> Self { + Self { + _data: Vec::with_capacity(SIZE), + _stats: { + let mut data = Vec::new(); + for i in 0..SIZE { + data.push(Status::FREE); + } + data + }, + _size: 0, + _capacity: SIZE, + } + } +}