From cf688ba11c2654b5dea25e180d905ca1262d8de8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Garillot?= Date: Thu, 9 Nov 2023 07:53:56 -0500 Subject: [PATCH] chore: remove unused coprocessor functions --- src/eval/lang.rs | 15 --------------- src/eval/mod.rs | 11 ----------- 2 files changed, 26 deletions(-) diff --git a/src/eval/lang.rs b/src/eval/lang.rs index a09dd166fe..39cfc7d9c1 100644 --- a/src/eval/lang.rs +++ b/src/eval/lang.rs @@ -211,21 +211,6 @@ impl> Lang { self.index.get(z_ptr).copied() } - pub fn get_coprocessor(&self, index: usize) -> Option<&C> { - self.coprocessors.get_index(index).map(|(_, (c, _))| c) - } - - pub fn get_coprocessor_z_ptr(&self, index: usize) -> Option<&ZExprPtr> { - self.coprocessors - .get_index(index) - .map(|(_, (_, z_ptr))| z_ptr) - } - - pub fn get_coprocessor_from_zptr(&self, z_ptr: &ZExprPtr) -> Option<&C> { - self.get_index(z_ptr) - .and_then(|index| self.get_coprocessor(index)) - } - #[inline] pub fn get_index_by_symbol(&self, sym: &Symbol) -> Option { self.coprocessors.get_index_of(sym) diff --git a/src/eval/mod.rs b/src/eval/mod.rs index 40ea7b89e5..82eeb7b40e 100644 --- a/src/eval/mod.rs +++ b/src/eval/mod.rs @@ -67,20 +67,9 @@ pub enum Meta { } impl Meta { - pub fn is_lurk(&self) -> bool { - *self == Self::Lurk - } - pub fn is_coprocessor(&self) -> bool { matches!(self, Self::Coprocessor(_)) } - - pub fn get_coprocessor_z_ptr(&self) -> Option<&ZExprPtr> { - match self { - Self::Lurk => None, - Self::Coprocessor(z_ptr) => Some(z_ptr), - } - } } #[derive(Clone, Copy, Debug, PartialEq, Eq)]