roblox_emulator: move lifetime inside PhantomData, saving 8 bytes

This commit is contained in:
Quaternions 2025-04-24 13:51:28 -07:00
parent 67cafd8cbb
commit ba1c1ec8c6
Signed by: Quaternions
GPG Key ID: D0DF5964F79AC131

@ -71,7 +71,7 @@ impl Runner{
self.lua.set_app_data::<crate::scheduler::Scheduler>(crate::scheduler::Scheduler::default()); self.lua.set_app_data::<crate::scheduler::Scheduler>(crate::scheduler::Scheduler::default());
Ok(Runnable{ Ok(Runnable{
lua:self.lua, lua:self.lua,
_lifetime:&std::marker::PhantomData _lifetime:std::marker::PhantomData
}) })
} }
} }
@ -79,7 +79,7 @@ impl Runner{
//Runnable is the same thing but has context set, which it holds the lifetime for. //Runnable is the same thing but has context set, which it holds the lifetime for.
pub struct Runnable<'a>{ pub struct Runnable<'a>{
lua:mlua::Lua, lua:mlua::Lua,
_lifetime:&'a std::marker::PhantomData<()> _lifetime:std::marker::PhantomData<&'a ()>
} }
impl Runnable<'_>{ impl Runnable<'_>{
pub fn drop_context(self)->Runner{ pub fn drop_context(self)->Runner{