Skip to main content

luaur_vm/methods/
temp_buffer_operator_index.rs

1use crate::records::temp_buffer::TempBuffer;
2use luaur_common::macros::luau_assert::LUAU_ASSERT;
3
4impl<T> TempBuffer<T> {
5    pub fn operator_index(&self, index: usize) -> &mut T {
6        LUAU_ASSERT!(index < self.count);
7        unsafe { &mut *self.data.add(index) }
8    }
9}