From 0ca170edaa168d75e6a05f462cb1820eebf41a6d Mon Sep 17 00:00:00 2001 From: Matt Keeter Date: Tue, 5 Nov 2024 09:20:17 -0500 Subject: [PATCH] Remove `simplify_inner` (#173) This doesn't appear to be used anywhere else, so we can inline it into `simplify` --- fidget/src/core/vm/mod.rs | 16 ++++------------ fidget/src/jit/mod.rs | 4 +--- 2 files changed, 5 insertions(+), 15 deletions(-) diff --git a/fidget/src/core/vm/mod.rs b/fidget/src/core/vm/mod.rs index 9e963b6c..c95be7b1 100644 --- a/fidget/src/core/vm/mod.rs +++ b/fidget/src/core/vm/mod.rs @@ -116,15 +116,6 @@ impl From> for GenericVmFunction { } impl GenericVmFunction { - pub(crate) fn simplify_inner( - &self, - choices: &[Choice], - storage: VmData, - workspace: &mut VmWorkspace, - ) -> Result { - let d = self.0.simplify(choices, workspace, storage)?; - Ok(Self(Arc::new(d))) - } /// Returns a characteristic size (the length of the inner assembly tape) pub fn size(&self) -> usize { self.0.len() @@ -171,11 +162,12 @@ impl Function for GenericVmFunction { type Trace = VmTrace; fn simplify( &self, - trace: &VmTrace, - storage: VmData, + trace: &Self::Trace, + storage: Self::Storage, workspace: &mut Self::Workspace, ) -> Result { - self.simplify_inner(trace.as_slice(), storage, workspace) + let d = self.0.simplify(trace.as_slice(), workspace, storage)?; + Ok(Self(Arc::new(d))) } fn recycle(self) -> Option { diff --git a/fidget/src/jit/mod.rs b/fidget/src/jit/mod.rs index a1d0a814..6d0da4fb 100644 --- a/fidget/src/jit/mod.rs +++ b/fidget/src/jit/mod.rs @@ -899,9 +899,7 @@ impl Function for JitFunction { storage: Self::Storage, workspace: &mut Self::Workspace, ) -> Result { - self.0 - .simplify_inner(trace.as_slice(), storage, workspace) - .map(JitFunction) + self.0.simplify(trace, storage, workspace).map(JitFunction) } fn recycle(self) -> Option {