diff --git a/Cargo.lock b/Cargo.lock index 2912bd1..da99691 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -135,7 +135,7 @@ dependencies = [ [[package]] name = "gmod" -version = "11.0.1" +version = "11.0.2" dependencies = [ "cfg_table 1.0.0", "cstr", @@ -144,7 +144,7 @@ dependencies = [ "fn_abi", "fn_has_this", "fn_type_alias", - "gmod-macros 1.0.3", + "gmod-macros 1.0.4", "gmserverplugin", "lazy_static", "libloading", @@ -165,7 +165,7 @@ dependencies = [ [[package]] name = "gmod-macros" -version = "1.0.3" +version = "1.0.4" dependencies = [ "proc-macro2", "quote", diff --git a/gmod-macros/Cargo.toml b/gmod-macros/Cargo.toml index 5630b03..3b7f661 100644 --- a/gmod-macros/Cargo.toml +++ b/gmod-macros/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "gmod-macros" -version = "1.0.3" +version = "1.0.4" authors = ["William Venner "] edition = "2018" license = "MIT" diff --git a/gmod-macros/src/lib.rs b/gmod-macros/src/lib.rs index 118f6fd..bba4ae8 100644 --- a/gmod-macros/src/lib.rs +++ b/gmod-macros/src/lib.rs @@ -44,7 +44,7 @@ pub fn gmod13_close(_attr: TokenStream, tokens: TokenStream) -> TokenStream { #[cfg(feature = "gmcl")] { let stmts = std::mem::take(&mut input.block.stmts); input.block.stmts = vec![syn::parse2(quote!({ - let ret = {#(#stmts);*}; + let ret = (|| {#(#stmts);*})(); ::gmod::gmcl::restore_stdout(); ret })).unwrap()]; diff --git a/gmod/Cargo.toml b/gmod/Cargo.toml index a5d520d..32605f1 100644 --- a/gmod/Cargo.toml +++ b/gmod/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "gmod" -version = "11.0.1" +version = "11.0.2" authors = ["William Venner "] edition = "2018" license = "MIT" @@ -16,7 +16,7 @@ server-plugin = ["gmserverplugin"] gmcl = ["gmod-macros/gmcl"] [dependencies] -gmod-macros = { version = "1.0.3", path = "../gmod-macros" } +gmod-macros = { version = "1.0.4", path = "../gmod-macros" } gmserverplugin = { version = "1", optional = true } libloading = "0"