Removed value method and use deref to get type

This commit is contained in:
Fayeed Pawaskar
2023-09-10 21:40:22 +05:30
parent 7b921fc767
commit af76659830
11 changed files with 48 additions and 54 deletions

View File

@@ -66,7 +66,7 @@ fn setup_predicate_indicator(term: &mut Term) -> Result<PredicateKey, Compilatio
let arity = match arity {
Term::Literal(_, Literal::Integer(n)) => {
let value: usize = n.value().try_into().unwrap();
let value: usize = (&*n).try_into().unwrap();
Some(value)
},
Term::Literal(_, Literal::Fixnum(n)) => usize::try_from(n.get_num()).ok(),