From 5c8d2ca498d81f0bac4fa50f240c9ef3196042c2 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Mon, 17 May 2021 13:49:30 +0200 Subject: [PATCH] Fix: Code is actually reachable This fixes an reachable `unreachable!()` statement. This might not be the approprite fix, although it resulted in no panic in the code I used to test it, so it seems appropriate as a first idea for a proper fix. Signed-off-by: Matthias Beyer --- src/state.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/state.rs b/src/state.rs index 148bd6f7..5900a893 100644 --- a/src/state.rs +++ b/src/state.rs @@ -453,7 +453,7 @@ impl ProgressDrawTarget { match self.kind { ProgressDrawTargetKind::Term { ref term, .. } => term.size().1 as usize, ProgressDrawTargetKind::Remote { ref state, .. } => state.read().unwrap().width(), - ProgressDrawTargetKind::Hidden => unreachable!(), + ProgressDrawTargetKind::Hidden => 0, } }