From 133b6c3e6dd098b09d0fd5239572f35c71d425e4 Mon Sep 17 00:00:00 2001 From: Philipp Mildenberger Date: Wed, 5 Jul 2023 17:02:07 +0200 Subject: [PATCH] Fix macro compile issues (and fix clippy issue with unnecessary lifetimes) --- crates/xilem_html/src/view.rs | 3 ++- crates/xilem_svg/src/view.rs | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/crates/xilem_html/src/view.rs b/crates/xilem_html/src/view.rs index c451bca00..5c7d74ff0 100644 --- a/crates/xilem_html/src/view.rs +++ b/crates/xilem_html/src/view.rs @@ -99,7 +99,8 @@ impl Pod { xilem_core::generate_view_trait! {View, DomNode, Cx, ChangeFlags;} xilem_core::generate_viewsequence_trait! {ViewSequence, View, ViewMarker, DomNode, Cx, ChangeFlags, Pod;} -xilem_core::generate_anyview_trait! {View, Cx, ChangeFlags, AnyNode} +xilem_core::generate_anyview_trait! {AnyView, View, ViewMarker, Cx, ChangeFlags, AnyNode, BoxedView;} +xilem_core::generate_memoize_view! {Memoize, MemoizeState, View, ViewMarker, Cx, ChangeFlags, s, memoize} xilem_core::impl_adapt_view! {View, Cx, ChangeFlags} /// This view container can switch between two views. diff --git a/crates/xilem_svg/src/view.rs b/crates/xilem_svg/src/view.rs index 09b2e054a..f6e20d168 100644 --- a/crates/xilem_svg/src/view.rs +++ b/crates/xilem_svg/src/view.rs @@ -63,7 +63,7 @@ impl Pod { node.into_pod() } - fn downcast_mut<'a, T: 'static>(&'a mut self) -> Option<&'a mut T> { + fn downcast_mut(&mut self) -> Option<&mut T> { self.0.as_any_mut().downcast_mut() } @@ -74,4 +74,5 @@ impl Pod { xilem_core::generate_view_trait! {View, DomElement, Cx, ChangeFlags;} xilem_core::generate_viewsequence_trait! {ViewSequence, View, ViewMarker, DomElement, Cx, ChangeFlags, Pod;} -xilem_core::generate_anyview_trait! {View, Cx, ChangeFlags, AnyElement} +xilem_core::generate_anyview_trait! {AnyView, View, ViewMarker, Cx, ChangeFlags, AnyElement, BoxedView;} +xilem_core::generate_memoize_view! {Memoize, MemoizeState, View, ViewMarker, Cx, ChangeFlags, s, memoize}