diff --git a/gmod/src/hax.rs b/gmod/src/hax.rs index 0c4756a..9571ef4 100644 --- a/gmod/src/hax.rs +++ b/gmod/src/hax.rs @@ -2,7 +2,7 @@ /// Common pattern for detouring. macro_rules! find_gmod_signature { (($library:ident, $library_path:ident), @EXPORT = $export:literal) => { - $library.get(concat!($export, '\0').as_bytes()).ok().map(|func: ::gmod::libloading::Symbol<'_, _>| *func) + $library.get(concat!($export, '\0').as_bytes()).ok().map(|func: $crate::libloading::Symbol<'_, _>| *func) }; (($library:ident, $library_path:ident), @SIG = $sig:literal) => { diff --git a/gmod/src/lua/mod.rs b/gmod/src/lua/mod.rs index 66c898e..77cc56d 100644 --- a/gmod/src/lua/mod.rs +++ b/gmod/src/lua/mod.rs @@ -41,6 +41,6 @@ pub enum LuaError { #[macro_export] macro_rules! lua_string { ( $str:literal ) => { - ::gmod::cstr::cstr!($str).as_ptr() + $crate::cstr::cstr!($str).as_ptr() }; } diff --git a/gmod/src/msgc.rs b/gmod/src/msgc.rs index 2099536..39a5795 100644 --- a/gmod/src/msgc.rs +++ b/gmod/src/msgc.rs @@ -61,21 +61,21 @@ lazy_static::lazy_static! { } #[macro_export] macro_rules! colormsg { - ($($($arg:expr)+),+) => { - $(::gmod::msgc::colormsg!(@print $($arg)+));+ + ($($arg:tt),+) => { + $($crate::colormsg!(@print $arg));+ }; (@print [$r:literal, $g:literal, $b:literal] $fmt:literal % ($($arg:tt),+)) => { - ::gmod::msgc::ConColorMsg( - &::gmod::msgc::Color::new($r, $g, $b), - ::gmod::msgc::printf_escape(format!(concat!($fmt, '\0'), $($arg),+)).as_ptr() as *const _, + $crate::msgc::ConColorMsg( + &$crate::msgc::Color::new($r, $g, $b), + $crate::msgc::printf_escape(format!(concat!($fmt, '\0'), $($arg),+)).as_ptr() as *const _, ) }; (@print [$r:literal, $g:literal, $b:literal] $str:literal) => { - ::gmod::msgc::ConColorMsg( - &::gmod::msgc::Color::new($r, $g, $b), - ::gmod::msgc::printf_escape(concat!($str, '\0')).as_ptr() as *const _, + $crate::msgc::ConColorMsg( + &$crate::msgc::Color::new($r, $g, $b), + $crate::msgc::printf_escape(concat!($str, '\0')).as_ptr() as *const _, ) }; }