mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-30 14:17:02 +00:00
Remove unnecessary with_element_id calls
This commit is contained in:
parent
a5306c2312
commit
be18c47912
1 changed files with 32 additions and 36 deletions
|
@ -746,13 +746,11 @@ where
|
|||
f: impl FnOnce(Style, &mut ViewContext<V>) -> LayoutId,
|
||||
) -> LayoutId {
|
||||
let style = self.compute_style(None, element_state, cx);
|
||||
cx.with_element_id(self.element_id.clone(), |cx| {
|
||||
cx.with_key_dispatch(
|
||||
self.key_context.clone(),
|
||||
self.tracked_focus_handle.clone(),
|
||||
|_, cx| f(style, cx),
|
||||
)
|
||||
})
|
||||
}
|
||||
|
||||
pub fn paint(
|
||||
|
@ -1037,7 +1035,6 @@ where
|
|||
.as_ref()
|
||||
.map(|scroll_offset| *scroll_offset.lock());
|
||||
|
||||
cx.with_element_id(self.element_id.clone(), |cx| {
|
||||
cx.with_key_dispatch(
|
||||
self.key_context.clone(),
|
||||
element_state.focus_handle.clone(),
|
||||
|
@ -1070,7 +1067,6 @@ where
|
|||
f(style, scroll_offset.unwrap_or_default(), cx)
|
||||
},
|
||||
);
|
||||
});
|
||||
|
||||
if let Some(group) = self.group.as_ref() {
|
||||
GroupBounds::pop(group, cx);
|
||||
|
|
Loading…
Reference in a new issue