From 8c554cfad9e4734dc890c3a970a38216d9c8a4a9 Mon Sep 17 00:00:00 2001 From: William Venner Date: Sun, 10 Oct 2021 20:03:43 +0100 Subject: [PATCH] Remove std::fmt::Debug from LuaDebug as it crashes a lot, make i_ci pub --- gmod/src/lua/mod.rs | 23 ++--------------------- 1 file changed, 2 insertions(+), 21 deletions(-) diff --git a/gmod/src/lua/mod.rs b/gmod/src/lua/mod.rs index 6105577..50915f9 100644 --- a/gmod/src/lua/mod.rs +++ b/gmod/src/lua/mod.rs @@ -92,24 +92,5 @@ pub struct LuaDebug { pub linedefined: i32, pub lastlinedefined: i32, pub short_src: [std::os::raw::c_char; LUA_IDSIZE], - i_ci: i32 -} -impl std::fmt::Debug for LuaDebug { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - unsafe { - f.debug_struct("LuaDebug") - .field("event", &self.event) - .field("name", &std::ffi::CStr::from_ptr(self.name)) - .field("namewhat", &std::ffi::CStr::from_ptr(self.namewhat)) - .field("what", &std::ffi::CStr::from_ptr(self.what)) - .field("source", &std::ffi::CStr::from_ptr(self.source)) - .field("currentline", &self.currentline) - .field("nups", &self.nups) - .field("linedefined", &self.linedefined) - .field("lastlinedefined", &self.lastlinedefined) - .field("short_src", &std::ffi::CStr::from_ptr(self.short_src.as_ptr())) - .field("i_ci", &self.i_ci) - .finish() - } - } -} + pub i_ci: i32 +} \ No newline at end of file