Skip to content

Commit

Permalink
Send correct message types from object macro
Browse files Browse the repository at this point in the history
  • Loading branch information
matthunz committed Dec 11, 2023
1 parent 8cae160 commit cc3ee91
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
4 changes: 1 addition & 3 deletions examples/counter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,5 @@ fn main() {

a.set(2);

for _ in 0..2 {
Runtime::current().run();
}
Runtime::current().run();
}
2 changes: 1 addition & 1 deletion macros/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ pub fn object(_attrs: TokenStream, input: TokenStream) -> TokenStream {
items.push(parse_quote! {
#[allow(unused_variables)]
pub #sig {
viewbuilder::Runtime::current().emit(Box::new((#(#input_pats),*)))
viewbuilder::Runtime::current().emit(Box::new((#(#input_pats),*,)))
}
});

Expand Down
2 changes: 1 addition & 1 deletion src/handle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ struct Dropper {

impl Drop for Dropper {
fn drop(&mut self) {
Runtime::current().inner.borrow_mut().nodes.remove(self.key);
//Runtime::current().inner.borrow_mut().nodes.remove(self.key);
}
}

Expand Down
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ pub use viewbuilder_macros::object;

mod any_object;
pub use self::any_object::AnyObject;

mod handle;
pub use self::handle::{Handle, HandleState, Ref};

Expand Down

0 comments on commit cc3ee91

Please sign in to comment.