diff --git a/emulator/core/src/devices.rs b/emulator/core/src/devices.rs index 2a66e07..71a2a29 100644 --- a/emulator/core/src/devices.rs +++ b/emulator/core/src/devices.rs @@ -1,4 +1,4 @@ -use std::any::{type_name, type_name_of_val, Any, TypeId}; +use std::any::{type_name, Any, TypeId}; use std::ops::Deref; use std::rc::Rc; use std::cell::RefCell; @@ -234,12 +234,6 @@ pub fn downcast_rc_refc<'a, T: DynDevice>(field: &'a Device) -> Result<&'a Rc>>; - -pub fn wrap_transmutable(value: T) -> TransmutableBox { - Rc::new(RefCell::new(Box::new(value))) -} - static NEXT_ID: AtomicU32 = AtomicU32::new(1); pub fn get_next_device_id() -> u32 { diff --git a/emulator/core/src/lib.rs b/emulator/core/src/lib.rs index 26dc8c8..a33600c 100644 --- a/emulator/core/src/lib.rs +++ b/emulator/core/src/lib.rs @@ -7,10 +7,10 @@ mod memory; mod system; pub use crate::devices::{ - Address, Addressable, Steppable, Interruptable, Debuggable, Inspectable, Transmutable, TransmutableBox, DynDevice, Device, + Address, Addressable, Steppable, Interruptable, Debuggable, Inspectable, Transmutable, DynDevice, Device, }; pub use crate::devices::{ - read_beu16, read_beu32, read_leu16, read_leu32, write_beu16, write_beu32, write_leu16, write_leu32, wrap_transmutable, wrap_device + read_beu16, read_beu32, read_leu16, read_leu32, write_beu16, write_beu32, write_leu16, write_leu32, wrap_device }; pub use crate::error::Error; pub use crate::interrupts::InterruptController;