Skip to content

Commit

Permalink
Merge pull request #74 from Philipp-M/fix-macro
Browse files Browse the repository at this point in the history
Fix macro compile issues (and fix clippy issue with unnecessary lifetimes)
  • Loading branch information
raphlinus authored Jul 5, 2023
2 parents 91be463 + 133b6c3 commit 00dd6c1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion crates/xilem_html/src/view.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
5 changes: 3 additions & 2 deletions crates/xilem_svg/src/view.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<T: 'static>(&mut self) -> Option<&mut T> {
self.0.as_any_mut().downcast_mut()
}

Expand All @@ -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}

0 comments on commit 00dd6c1

Please sign in to comment.