From ba1c1ec8c66c880ca75be5da52673d33e512938f Mon Sep 17 00:00:00 2001 From: Quaternions <krakow20@gmail.com> Date: Thu, 24 Apr 2025 13:51:28 -0700 Subject: [PATCH] roblox_emulator: move lifetime inside PhantomData, saving 8 bytes --- lib/roblox_emulator/src/runner/runner.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/roblox_emulator/src/runner/runner.rs b/lib/roblox_emulator/src/runner/runner.rs index 5ce3551..197366a 100644 --- a/lib/roblox_emulator/src/runner/runner.rs +++ b/lib/roblox_emulator/src/runner/runner.rs @@ -71,7 +71,7 @@ impl Runner{ self.lua.set_app_data::<crate::scheduler::Scheduler>(crate::scheduler::Scheduler::default()); Ok(Runnable{ 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. pub struct Runnable<'a>{ lua:mlua::Lua, - _lifetime:&'a std::marker::PhantomData<()> + _lifetime:std::marker::PhantomData<&'a ()> } impl Runnable<'_>{ pub fn drop_context(self)->Runner{