From 37e31b24436fb34d3befdf1ddf1de1df956d7224 Mon Sep 17 00:00:00 2001 From: alexandre pasmantier Date: Tue, 15 Jul 2025 10:23:47 +0200 Subject: [PATCH] fix: clean exit when fallback channel is not found Fixes #643 --- television/cli/mod.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/television/cli/mod.rs b/television/cli/mod.rs index d39ae88..50807e8 100644 --- a/television/cli/mod.rs +++ b/television/cli/mod.rs @@ -515,10 +515,7 @@ pub fn guess_channel_from_prompt( debug!("Guessing channel from prompt: {}", prompt); // git checkout -qf // --- -------- --- <--------- - let fallback = cable - .get(fallback_channel) - .expect("Fallback channel not found in cable channels") - .clone(); + let fallback = cable.get_channel(fallback_channel); if prompt.trim().is_empty() { return fallback; }