From 24f11b5ae98e505d1815a0d82b64b7c94f4e23d4 Mon Sep 17 00:00:00 2001 From: Mark Thom Date: Wed, 3 Jun 2020 22:05:46 -0600 Subject: [PATCH] remove unreachable branch in increment_s_ptr (#575) --- src/prolog/machine/machine_state_impl.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/prolog/machine/machine_state_impl.rs b/src/prolog/machine/machine_state_impl.rs index 68ae9e36..1e52dd1b 100644 --- a/src/prolog/machine/machine_state_impl.rs +++ b/src/prolog/machine/machine_state_impl.rs @@ -689,7 +689,7 @@ impl MachineState { &mut HeapPtr::PStrChar(h, ref mut n) | &mut HeapPtr::PStrLocation(h, ref mut n) => { match &self.heap[h] { - HeapCellValue::PartialString(ref pstr, _) => { + &HeapCellValue::PartialString(ref pstr, _) => { for c in pstr.range_from(*n ..).take(rhs) { *n += c.len_utf8(); } @@ -697,7 +697,6 @@ impl MachineState { self.s = HeapPtr::PStrLocation(h, *n); } _ => { - unreachable!() } } } -- 2.54.0