Fixed missing functionality in dashu with their methods still has some issue with move
This commit is contained in:
@@ -1387,7 +1387,7 @@ impl MachineState {
|
||||
Ok(Number::Float(_)) => {
|
||||
return type_error(arity);
|
||||
}
|
||||
Ok(Number::Rational(n)) if n.denom() != &1 => {
|
||||
Ok(Number::Rational(n)) if !n.denominator().is_one() => {
|
||||
return type_error(arity);
|
||||
}
|
||||
Ok(n) if n > MAX_ARITY => {
|
||||
@@ -1400,7 +1400,7 @@ impl MachineState {
|
||||
let err = self.domain_error(DomainErrorType::NotLessThanZero, n);
|
||||
return Err(self.error_form(err, stub_gen()));
|
||||
}
|
||||
Ok(Number::Rational(n)) => n.numer().to_i64().unwrap(),
|
||||
Ok(Number::Rational(n)) => n.numerator().to_i64().unwrap(),
|
||||
Ok(Number::Fixnum(n)) => n.get_num(),
|
||||
Ok(Number::Integer(n)) => n.to_i64().unwrap(),
|
||||
Err(_) => {
|
||||
|
||||
Reference in New Issue
Block a user