Reduce render allocations and redundant work in core components

This commit is contained in:
2026-11-09 14:35:15 +07:00
parent 73f7dc31d4
commit 122f9b12ae
19 changed files with 174 additions and 139 deletions
+4 -4
View File
@@ -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)