Implemented num_order methods on Integer & Rational numbers
This commit is contained in:
@@ -1116,8 +1116,9 @@ pub(crate) fn constant_key_alternatives(
|
||||
}
|
||||
*/
|
||||
Literal::Integer(ref n) => {
|
||||
if let Some(n) = n.to_isize() {
|
||||
Fixnum::build_with_checked(n as i64).map(|n| {
|
||||
let result = n.value().try_into();
|
||||
if let Ok(value) = result {
|
||||
Fixnum::build_with_checked(value).map(|n| {
|
||||
constants.push(Literal::Fixnum(n));
|
||||
}).unwrap();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user