remove unreachable branch in increment_s_ptr (#575)

This commit is contained in:
Mark Thom
2020-06-03 22:05:46 -06:00
parent 1d44d99875
commit 24f11b5ae9

View File

@@ -689,7 +689,7 @@ impl MachineState {
&mut HeapPtr::PStrChar(h, ref mut n) | &mut HeapPtr::PStrChar(h, ref mut n) |
&mut HeapPtr::PStrLocation(h, ref mut n) => { &mut HeapPtr::PStrLocation(h, ref mut n) => {
match &self.heap[h] { match &self.heap[h] {
HeapCellValue::PartialString(ref pstr, _) => { &HeapCellValue::PartialString(ref pstr, _) => {
for c in pstr.range_from(*n ..).take(rhs) { for c in pstr.range_from(*n ..).take(rhs) {
*n += c.len_utf8(); *n += c.len_utf8();
} }
@@ -697,7 +697,6 @@ impl MachineState {
self.s = HeapPtr::PStrLocation(h, *n); self.s = HeapPtr::PStrLocation(h, *n);
} }
_ => { _ => {
unreachable!()
} }
} }
} }