diff --git a/examples/counter.rs b/examples/counter.rs index 7dd9779..b2cb559 100644 --- a/examples/counter.rs +++ b/examples/counter.rs @@ -26,7 +26,5 @@ fn main() { a.set(2); - for _ in 0..2 { - Runtime::current().run(); - } + Runtime::current().run(); } diff --git a/macros/src/lib.rs b/macros/src/lib.rs index cf2bd09..b6f2f64 100644 --- a/macros/src/lib.rs +++ b/macros/src/lib.rs @@ -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),*,))) } }); diff --git a/src/handle.rs b/src/handle.rs index ee8f30d..f7a450f 100644 --- a/src/handle.rs +++ b/src/handle.rs @@ -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); } } diff --git a/src/lib.rs b/src/lib.rs index c82a9b5..b70e7a1 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -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};