]> Repositorios git - scryer-prolog.git/commitdiff
Fix warnings of dead code
authorAdrián Arroyo Calle <[email protected]>
Mon, 27 May 2024 17:52:02 +0000 (19:52 +0200)
committerAdrián Arroyo Calle <[email protected]>
Mon, 27 May 2024 17:52:02 +0000 (19:52 +0200)
src/machine/machine_indices.rs
src/machine/unify.rs

index 830cc91f2990000a7df935303422b81041595a53..856c7766b870e22d4c9a24293f579a33d7d8c934 100644 (file)
@@ -18,8 +18,6 @@ use std::collections::BTreeSet;
 use std::ops::{Deref, DerefMut};
 
 use crate::types::*;
-#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
-pub(crate) struct OrderedOpDirKey(pub(crate) Atom, pub(crate) Fixity);
 
 // 7.2
 #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord)]
index b045552b80782f69eff1fb2a5e8bcb46793d0c99..7cd3df06f193b6114ad0b1bca3f3e7c06c758159 100644 (file)
@@ -453,30 +453,6 @@ pub(crate) trait Unifier: DerefMut<Target = MachineState> {
         }
     }
 
-    fn unify_big_num<N>(&mut self, n1: TypedArenaPtr<N>, value: HeapCellValue)
-    where
-        N: PartialEq<Rational> + PartialEq<Integer> + PartialEq<i64> + ArenaAllocated,
-    {
-        if let Some(r) = value.as_var() {
-            Self::bind(self, r, typed_arena_ptr_as_cell!(n1));
-            return;
-        }
-
-        match Number::try_from(value) {
-            Ok(n2) => match n2 {
-                Number::Fixnum(n2) if *n1 == n2.get_num() => {}
-                Number::Integer(n2) if *n1 == *n2 => {}
-                Number::Rational(n2) if *n1 == *n2 => {}
-                _ => {
-                    self.fail = true;
-                }
-            },
-            Err(_) => {
-                self.fail = true;
-            }
-        }
-    }
-
     fn unify_big_integer(&mut self, n1: TypedArenaPtr<Integer>, value: HeapCellValue) {
         if let Some(r) = value.as_var() {
             Self::bind(self, r, typed_arena_ptr_as_cell!(n1));