From c126ff10a764607beb9dba761c253c7be15bfbcd Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Tue, 17 Oct 2023 11:21:02 +0200 Subject: [PATCH] Checkpoint --- crates/gpui3/src/elements/div.rs | 2 +- crates/gpui3/src/elements/img.rs | 2 +- crates/gpui3/src/elements/nested.rs | 2 +- crates/gpui3/src/elements/svg.rs | 2 +- crates/gpui3/src/taffy.rs | 2 +- crates/gpui3/src/window.rs | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/crates/gpui3/src/elements/div.rs b/crates/gpui3/src/elements/div.rs index 41874d9e89..03229dc1da 100644 --- a/crates/gpui3/src/elements/div.rs +++ b/crates/gpui3/src/elements/div.rs @@ -61,7 +61,7 @@ where let child_layout_ids = style.apply_text_style(cx, |cx| { self.with_element_id(cx, |this, cx| this.layout_children(view, cx)) }); - let layout_id = cx.request_layout(style.into(), child_layout_ids.clone()); + let layout_id = cx.request_layout(&style, child_layout_ids.clone()); (layout_id, ()) } diff --git a/crates/gpui3/src/elements/img.rs b/crates/gpui3/src/elements/img.rs index 8709707f31..a8e65fa0ff 100644 --- a/crates/gpui3/src/elements/img.rs +++ b/crates/gpui3/src/elements/img.rs @@ -62,7 +62,7 @@ impl Element for Img { Self: Sized, { let style = self.computed_style(); - let layout_id = cx.request_layout(style, []); + let layout_id = cx.request_layout(&style, []); (layout_id, ()) } diff --git a/crates/gpui3/src/elements/nested.rs b/crates/gpui3/src/elements/nested.rs index 532654958a..297460f320 100644 --- a/crates/gpui3/src/elements/nested.rs +++ b/crates/gpui3/src/elements/nested.rs @@ -134,7 +134,7 @@ impl Element for LayoutNodeElement>(); - let style = this.computed_style().clone(); + let style = this.computed_style(); let layout_id = cx.request_layout(style, layout_ids); (layout_id, ()) }) diff --git a/crates/gpui3/src/elements/svg.rs b/crates/gpui3/src/elements/svg.rs index cd11c92751..c81eff7aa9 100644 --- a/crates/gpui3/src/elements/svg.rs +++ b/crates/gpui3/src/elements/svg.rs @@ -53,7 +53,7 @@ impl Element for Svg { Self: Sized, { let style = self.computed_style(); - (cx.request_layout(style, []), ()) + (cx.request_layout(&style, []), ()) } fn paint( diff --git a/crates/gpui3/src/taffy.rs b/crates/gpui3/src/taffy.rs index cadb7e1b57..71844bb8a6 100644 --- a/crates/gpui3/src/taffy.rs +++ b/crates/gpui3/src/taffy.rs @@ -28,7 +28,7 @@ impl TaffyLayoutEngine { pub fn request_layout( &mut self, - style: Style, + style: &Style, rem_size: Pixels, children: &[LayoutId], ) -> LayoutId { diff --git a/crates/gpui3/src/window.rs b/crates/gpui3/src/window.rs index b57f152f21..fa52941ead 100644 --- a/crates/gpui3/src/window.rs +++ b/crates/gpui3/src/window.rs @@ -248,7 +248,7 @@ impl<'a, 'w> WindowContext<'a, 'w> { pub fn request_layout( &mut self, - style: Style, + style: &Style, children: impl IntoIterator, ) -> LayoutId { self.app.layout_id_buffer.clear();