From 78ef18ad75546a58386adddd5da883256664f9a0 Mon Sep 17 00:00:00 2001 From: Mark Thom Date: Tue, 18 Sep 2018 20:58:42 -0600 Subject: [PATCH] stop treating copier as trait object --- src/prolog/copier.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/prolog/copier.rs b/src/prolog/copier.rs index 2ee845c6..1988c350 100644 --- a/src/prolog/copier.rs +++ b/src/prolog/copier.rs @@ -9,7 +9,7 @@ pub(crate) struct RedirectInfo { trail: Trail } -pub(crate) trait CopierTarget +pub(crate) trait CopierTarget: IndexMut { fn source(&self) -> usize; fn threshold(&self) -> usize; @@ -19,7 +19,6 @@ pub(crate) trait CopierTarget fn stack(&mut self) -> &mut AndStack; fn unwind_trail(&mut self, redirect: RedirectInfo) - where Self: IndexMut { for (r, hcv) in redirect.trail { match r { @@ -30,7 +29,6 @@ pub(crate) trait CopierTarget } fn reinstantiate_var(&mut self, ra: Addr, scan: usize, trail: &mut Trail) - where Self: IndexMut { self[scan] = HeapCellValue::Addr(Addr::HeapCell(scan)); @@ -49,7 +47,6 @@ pub(crate) trait CopierTarget // at L1 to L2. trail is kept to restore the innards of L1 after // it's been copied to L2. fn duplicate_term_impl(&mut self, addr: Addr) -> RedirectInfo - where Self: IndexMut { let mut trail = Trail::new(); let mut scan = self.source(); @@ -153,7 +150,6 @@ pub(crate) trait CopierTarget } fn duplicate_term(&mut self, addr: Addr) - where Self: IndexMut { let redirect = self.duplicate_term_impl(addr); self.unwind_trail(redirect); -- 2.54.0