Skip to content

Commit

Permalink
Fix: Code is actually reachable
Browse files Browse the repository at this point in the history
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 <mail@beyermatthias.de>
  • Loading branch information
matthiasbeyer authored and djc committed May 20, 2021
1 parent 6a49439 commit 1047de9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/state.rs
Expand Up @@ -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,
}
}

Expand Down

0 comments on commit 1047de9

Please sign in to comment.