diff --git a/crates/byondapi-rs/src/lib.rs b/crates/byondapi-rs/src/lib.rs index 3b630c6..7c6868f 100644 --- a/crates/byondapi-rs/src/lib.rs +++ b/crates/byondapi-rs/src/lib.rs @@ -15,8 +15,11 @@ use crate::value::ByondValue; /// # Safety /// Don't pass in a null argv pointer please god /// Just give this what BYOND gives you and pray for the best -pub unsafe fn parse_args(argc: byondapi_sys::u4c, argv: *mut ByondValue) -> Vec { - unsafe { std::slice::from_raw_parts_mut(argv, argc as usize).to_vec() } +pub unsafe fn parse_args( + argc: byondapi_sys::u4c, + argv: *mut ByondValue, +) -> &'static mut [ByondValue] { + unsafe { std::slice::from_raw_parts_mut(argv, argc as usize) } } /// Re-export of byondapi_sys for all low level things you may run into.