From ea75468522a43aaa7e14ae75f55df1ed6b78e091 Mon Sep 17 00:00:00 2001 From: "Jomer.Dev" Date: Sun, 16 Jun 2024 15:05:20 +0200 Subject: [PATCH] Remove unused imports and exports --- emulator/core/src/devices.rs | 8 +------- emulator/core/src/lib.rs | 4 ++-- 2 files changed, 3 insertions(+), 9 deletions(-) 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;