abuse macros..
This commit is contained in:
@@ -155,6 +155,18 @@ pub fn derive_ui_state(input: TokenStream) -> TokenStream {
|
||||
impl HasState for #rscname {
|
||||
type State = #sname;
|
||||
}
|
||||
|
||||
impl StateLike<#sname> for #sname {
|
||||
fn as_state(&mut self) -> &mut Self {
|
||||
self
|
||||
}
|
||||
}
|
||||
|
||||
impl StateLike<#rscname> for #rscname {
|
||||
fn as_state(&mut self) -> &mut Self {
|
||||
self
|
||||
}
|
||||
}
|
||||
});
|
||||
output.into()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user