diff options
author | Dan Davison <dandavison7@gmail.com> | 2021-12-06 11:45:48 -0500 |
---|---|---|
committer | Dan Davison <dandavison7@gmail.com> | 2021-12-06 11:56:26 -0500 |
commit | 5901af50280846ab6c3e0e2cc249e27939a257e4 (patch) | |
tree | 05dd4400f2cc25efaa13ffe400f333f6ee5a8361 /src | |
parent | 0acbc475d6172ca128d42f6a51eba69960c6b2c5 (diff) |
Be permissive about unexpected state machine state
Fixes #826
Diffstat (limited to 'src')
-rw-r--r-- | src/handlers/hunk_header.rs | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/handlers/hunk_header.rs b/src/handlers/hunk_header.rs index 84b5bf64..ee109f68 100644 --- a/src/handlers/hunk_header.rs +++ b/src/handlers/hunk_header.rs @@ -25,7 +25,7 @@ use lazy_static::lazy_static; use regex::Regex; use super::draw; -use crate::config::{delta_unreachable, Config}; +use crate::config::Config; use crate::delta::{self, DiffType, InMergeConflict, MergeParents, State, StateMachine}; use crate::paint::{self, BgShouldFill, Painter, StyleSectionSpecifier}; use crate::style::DecorationStyle; @@ -63,11 +63,7 @@ impl<'a> StateMachine<'a> { | HunkMinus(diff_type, _) | HunkZero(diff_type) | HunkPlus(diff_type, _) => diff_type.clone(), - Unknown => Unified, - _ => delta_unreachable(&format!( - "Unexpected state in handle_hunk_header: {:?}", - self.state - )), + _ => Unified, }; self.state = HunkHeader( diff_type, |