Skip to content

Commit

Permalink
Add missing asserts and Debug fields in UiSurface from bevyengine#12268
Browse files Browse the repository at this point in the history
  • Loading branch information
StrikeForceZero committed Mar 30, 2024
1 parent be7e6a2 commit d761918
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions crates/bevy_ui/src/layout/ui_surface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ pub struct UiSurface {
fn _assert_send_sync_ui_surface_impl_safe() {
fn _assert_send_sync<T: Send + Sync>() {}
_assert_send_sync::<EntityHashMap<taffy::node::Node>>();
_assert_send_sync::<EntityHashMap<EntityHashMap<taffy::node::Node>>>();
_assert_send_sync::<EntityHashMap<Vec<RootNodePair>>>();
_assert_send_sync::<Taffy>();
_assert_send_sync::<UiSurface>();
}
Expand All @@ -40,6 +42,7 @@ impl fmt::Debug for UiSurface {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
f.debug_struct("UiSurface")
.field("entity_to_taffy", &self.entity_to_taffy)
.field("camera_entity_to_taffy", &self.camera_entity_to_taffy)
.field("camera_roots", &self.camera_roots)
.finish()
}
Expand Down

0 comments on commit d761918

Please sign in to comment.