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

@@ -259,7 +259,7 @@ pub(crate) fn to_local_code_ptr(heap: &Heap, addr: HeapCellValue) -> Option<usiz
match Number::try_from(heap[s]) {
Ok(Number::Fixnum(n)) => usize::try_from(n.get_num()).ok(),
Ok(Number::Integer(n)) => {
let value: usize = n.value().try_into().unwrap();
let value: usize = (&*n).try_into().unwrap();
Some(value)
},
_ => None,