This commit is contained in:
nora 2023-04-18 21:05:41 +02:00
parent 3aeb47877d
commit 80206ebcd3
2 changed files with 4 additions and 6 deletions

View file

@ -2,14 +2,14 @@ use proc_macro::TokenStream;
use quote::quote; use quote::quote;
#[proc_macro_derive(Inspect)] #[proc_macro_derive(Inspect)]
pub fn derive_inspect(input: TokenStream) -> TokenStream { pub fn derive_inspect(_: TokenStream) -> TokenStream {
let expanded = quote! { quote! {
impl GameState { impl GameState {
fn inspect_mut(&mut self) { fn inspect_mut(&mut self) {
output_mut(|o| o.copied_text = "".into()); output_mut(|o| o.copied_text = "".into());
output_mut(|o| o.copied_text = format!("{:?}", self.tile_db)); output_mut(|o| o.copied_text = format!("{:?}", self.tile_db));
} }
} }
}; }
proc_macro::TokenStream::from(expanded) .into()
} }

View file

@ -1,5 +1,3 @@
extern crate alloc;
pub struct TileDef { pub struct TileDef {
pub layer: (), pub layer: (),
#[cfg(second)] #[cfg(second)]