From 3ebe42790c881f59a9a09b609aa86c88d7e296bf Mon Sep 17 00:00:00 2001 From: Breadway Date: Sun, 19 Jul 2026 14:07:29 +0800 Subject: [PATCH] fix(ui): drop RefCell borrow before match statement in populate. Extracts model.borrow().kind to a local variable to drop the temporary immutable borrow before entering 'populate_*' arms, preventing a runtime panic when nested functions attempt a mutable borrrow. --- src/ui/views/keybinds.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ui/views/keybinds.rs b/src/ui/views/keybinds.rs index ab5a0dc..a8ae2a1 100644 --- a/src/ui/views/keybinds.rs +++ b/src/ui/views/keybinds.rs @@ -564,7 +564,9 @@ fn populate(content: &GBox, model: &Rc>, status: &Label) { Rc::new(move || rerender(&content, &model, &status)) }; - match model.borrow().kind { + let kind = model.borrow().kind; + + match kind { SchemaKind::Unknown => populate_unknown(content, status), SchemaKind::Flat => populate_flat(content, model, status, &rerender), SchemaKind::MultiLayout => populate_multi_layout(content, model, &rerender),