]> Repositorios git - scryer-prolog.git/commitdiff
remove unreachable branch in increment_s_ptr (#575)
authorMark Thom <[email protected]>
Thu, 4 Jun 2020 04:05:46 +0000 (22:05 -0600)
committerMark Thom <[email protected]>
Thu, 4 Jun 2020 04:05:46 +0000 (22:05 -0600)
src/prolog/machine/machine_state_impl.rs

index 68ae9e36dab3f420987f7e0147bcf48ec830845f..1e52dd1bec7487aa947dfb8d08e8917351cbc067 100644 (file)
@@ -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!()
                     }
                 }
             }