remove unsafe impl From<UntypedArenaPtr> for CodeIndex
This commit is contained in:
@@ -69,8 +69,8 @@ impl TryFrom<HeapCellValue> for Literal {
|
||||
(ArenaHeaderTag::Rational, n) => {
|
||||
Ok(Literal::Rational(n))
|
||||
}
|
||||
(ArenaHeaderTag::IndexPtr, _ip) => {
|
||||
Ok(Literal::CodeIndex(CodeIndex::from(cons_ptr)))
|
||||
(ArenaHeaderTag::IndexPtr, ip) => {
|
||||
Ok(Literal::CodeIndex(CodeIndex::from(ip)))
|
||||
}
|
||||
_ => {
|
||||
Err(())
|
||||
|
||||
@@ -159,13 +159,6 @@ impl From<CodeIndex> for UntypedArenaPtr {
|
||||
}
|
||||
}
|
||||
|
||||
impl From<UntypedArenaPtr> for CodeIndex {
|
||||
#[inline(always)]
|
||||
fn from(ptr: UntypedArenaPtr) -> CodeIndex {
|
||||
CodeIndex(unsafe { ptr.as_typed_ptr() })
|
||||
}
|
||||
}
|
||||
|
||||
impl From<TypedArenaPtr<IndexPtr>> for CodeIndex {
|
||||
#[inline(always)]
|
||||
fn from(ptr: TypedArenaPtr<IndexPtr>) -> CodeIndex {
|
||||
|
||||
Reference in New Issue
Block a user