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;
|
||||
|
||||
#[proc_macro_derive(Inspect)]
|
||||
pub fn derive_inspect(input: TokenStream) -> TokenStream {
|
||||
let expanded = quote! {
|
||||
pub fn derive_inspect(_: TokenStream) -> TokenStream {
|
||||
quote! {
|
||||
impl GameState {
|
||||
fn inspect_mut(&mut self) {
|
||||
output_mut(|o| o.copied_text = "".into());
|
||||
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 layer: (),
|
||||
#[cfg(second)]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue