mirror of
https://github.com/Noratrieb/game-wip-dontplay.git
synced 2026-01-14 11:45:01 +01:00
more
This commit is contained in:
parent
3aeb47877d
commit
80206ebcd3
2 changed files with 4 additions and 6 deletions
|
|
@ -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()
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,3 @@
|
||||||
extern crate alloc;
|
|
||||||
|
|
||||||
pub struct TileDef {
|
pub struct TileDef {
|
||||||
pub layer: (),
|
pub layer: (),
|
||||||
#[cfg(second)]
|
#[cfg(second)]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue