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

@@ -372,7 +372,7 @@ impl<'a> ArithmeticEvaluator<'a> {
pub(crate) fn rnd_i<'a>(n: &'a Number, arena: &mut Arena) -> Number {
match n {
&Number::Integer(i) => {
let result = i.value().try_into();
let result = (&*i).try_into();
if let Ok(value) = result{
fixnum!(Number, value, arena)
} else {