diff --git a/crates/hx-tui/src/lib.rs b/crates/hx-tui/src/lib.rs index 8f38099..1f20252 100644 --- a/crates/hx-tui/src/lib.rs +++ b/crates/hx-tui/src/lib.rs @@ -1688,9 +1688,16 @@ async fn submit(app: &mut App, mut line: String, c: &Ctx<'_>) { let _ = tx.send(Ui::Compacted(r)); }); } - _ if let Some(Source::Skill(p)) = - app.specs.iter().find(|s| s.name == c).map(|s| &s.source) => + _ if matches!( + app.specs.iter().find(|s| s.name == c).map(|s| &s.source), + Some(Source::Skill(_)) + ) => { + let Some(Source::Skill(p)) = + app.specs.iter().find(|s| s.name == c).map(|s| &s.source) + else { + unreachable!() + }; match cmd::skill_prompt(c, p, arg) { Ok(t) => line = t, Err(e) => app.t.push(Item::Error(format!("/{c}: {e}"))),