diff options
Diffstat (limited to '')
-rw-r--r-- | src/event.rs | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/event.rs b/src/event.rs index b3fa9ae..a63a475 100644 --- a/src/event.rs +++ b/src/event.rs @@ -3512,12 +3512,8 @@ impl Point { b'\n' | b'\r' => unreachable!("cannot move past line endings"), b'\t' => { let remainder = next.column % TAB_SIZE; - let vs = if remainder == 0 { - 0 - } else { - TAB_SIZE - remainder - }; - + debug_assert_ne!(remainder, 0, "expected remainder larger than `0`"); + let vs = TAB_SIZE - remainder; next.index += 1; next.column += 1 + vs; } |