gpui: Pass Style by value to request_layout (#11597)
A minor thing I've spotted and decided to fix on the spot. It was being cloned twice within the body of that function (one of which was redundant even without this PR); now in most cases we go down from 2 clones to 0. Release Notes: - N/A
This commit is contained in:
@@ -195,7 +195,7 @@ impl<M: ManagedView> Element for PopoverMenu<M> {
|
||||
.map(|child_element| child_element.request_layout(cx));
|
||||
|
||||
let layout_id = cx.request_layout(
|
||||
&gpui::Style::default(),
|
||||
gpui::Style::default(),
|
||||
menu_layout_id.into_iter().chain(child_layout_id),
|
||||
);
|
||||
|
||||
|
||||
@@ -142,7 +142,7 @@ impl<M: ManagedView> Element for RightClickMenu<M> {
|
||||
.map(|child_element| child_element.request_layout(cx));
|
||||
|
||||
let layout_id = cx.request_layout(
|
||||
&gpui::Style::default(),
|
||||
gpui::Style::default(),
|
||||
menu_layout_id.into_iter().chain(child_layout_id),
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user