Reduce render allocations and redundant work in core components
This commit is contained in:
@@ -335,8 +335,8 @@ impl Render for CommandPaletteState {
|
||||
h_flex()
|
||||
.id(("command", row))
|
||||
.debug_selector({
|
||||
let name = format!("{id}-command-{row}");
|
||||
move || name
|
||||
let id = id.clone();
|
||||
move || format!("{id}-command-{row}")
|
||||
})
|
||||
.gap_2()
|
||||
.px_2()
|
||||
@@ -409,8 +409,8 @@ impl Render for CommandPaletteState {
|
||||
let panel = v_flex()
|
||||
.id((id.clone(), "panel"))
|
||||
.debug_selector({
|
||||
let name = format!("{id}-panel");
|
||||
move || name
|
||||
let id = id.clone();
|
||||
move || format!("{id}-panel")
|
||||
})
|
||||
.key_context(COMMAND_PALETTE_CONTEXT)
|
||||
.role(Role::Dialog)
|
||||
|
||||
Reference in New Issue
Block a user