Skip to content

Commit

Permalink
macro: Fix compilation errors with cargo fmt
Browse files Browse the repository at this point in the history
Its a very questionable change and a very questionable macro. This macro should not be in macroquad_macro! But, for now, it is what it is.
  • Loading branch information
not-fl3 committed Jul 23, 2024
1 parent f51f22a commit 7831601
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions macroquad_macro/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -296,19 +296,24 @@ pub fn capability_trait_macro(input: proc_macro::TokenStream) -> proc_macro::Tok
trait_decl.push_str(&format!(
"fn {} {} -> {};",
fn_name,
fn_args_decl.replace("node : HandleUntyped", "&self"),
fn_args_decl
.replace("node : HandleUntyped", "&self")
.replace("node: HandleUntyped", "&self"),
fn_res
));

let args = fn_args_impl
.replace("node : HandleUntyped", "")
.replace("node: HandleUntyped", "")
.replace("(", "")
.replace(")", "");

trait_impl.push_str(&format!(
"fn {} {} -> {} {{",
fn_name,
fn_args_decl.replace("node : HandleUntyped", "&self"),
fn_args_decl
.replace("node : HandleUntyped", "&self")
.replace("node: HandleUntyped", "&self"),
fn_res
));
trait_impl.push_str(&format!(
Expand Down

0 comments on commit 7831601

Please sign in to comment.