roblox_emulator: move lifetime inside PhantomData, saving 8 bytes
This commit is contained in:
parent
67cafd8cbb
commit
ba1c1ec8c6
@ -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{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user