Upgrade dashu and some changes

This commit is contained in:
Jacob
2023-09-13 12:29:12 -04:00
parent 4077040d03
commit adb5fcf708
8 changed files with 61 additions and 70 deletions

View File

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