Skip to main content

luaur_ast/methods/
temp_vector_t_temp_vector_parser.rs

1use crate::records::temp_vector::TempVector;
2
3impl<'a, T> TempVector<'a, T> {
4    #[allow(non_snake_case)]
5    pub fn new(storage: &mut alloc::vec::Vec<T>) -> Self {
6        let offset = storage.len();
7        Self {
8            storage: storage as *mut _,
9            offset,
10            size_: 0,
11            _marker: core::marker::PhantomData,
12        }
13    }
14}
15
16#[allow(non_snake_case)]
17pub fn temp_vector_t_temp_vector<'a, T>(storage: &mut alloc::vec::Vec<T>) -> TempVector<'a, T> {
18    TempVector::new(storage)
19}