Checkpoint

Antonio Scandurra created

Change summary

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(-)

Detailed changes

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, ())
     }
 

crates/gpui3/src/elements/img.rs 🔗

@@ -62,7 +62,7 @@ impl<S: Send + Sync + 'static> Element for Img<S> {
         Self: Sized,
     {
         let style = self.computed_style();
-        let layout_id = cx.request_layout(style, []);
+        let layout_id = cx.request_layout(&style, []);
         (layout_id, ())
     }
 

crates/gpui3/src/elements/nested.rs 🔗

@@ -134,7 +134,7 @@ impl<V: 'static + Send + Sync, K: ElementKind> Element for LayoutNodeElement<V,
                 .map(|child| child.layout(state, cx))
                 .collect::<Vec<_>>();
 
-            let style = this.computed_style().clone();
+            let style = this.computed_style();
             let layout_id = cx.request_layout(style, layout_ids);
             (layout_id, ())
         })

crates/gpui3/src/elements/svg.rs 🔗

@@ -53,7 +53,7 @@ impl<S: 'static + Send + Sync> Element for Svg<S> {
         Self: Sized,
     {
         let style = self.computed_style();
-        (cx.request_layout(style, []), ())
+        (cx.request_layout(&style, []), ())
     }
 
     fn paint(

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 {

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<Item = LayoutId>,
     ) -> LayoutId {
         self.app.layout_id_buffer.clear();