From cd182e9efc423946f3d02e4dbefd6273aa5f6c86 Mon Sep 17 00:00:00 2001 From: bunnie Date: Wed, 24 Sep 2025 01:03:09 +0800 Subject: [PATCH] remove Drop on no-std this saves a whole bunch of glue code that never gets called in no-std --- libs/bao1x-hal/src/ifram.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libs/bao1x-hal/src/ifram.rs b/libs/bao1x-hal/src/ifram.rs index 2b9caa9c3..b430046c5 100644 --- a/libs/bao1x-hal/src/ifram.rs +++ b/libs/bao1x-hal/src/ifram.rs @@ -1,7 +1,7 @@ use bao1x_api::*; +use xous::MemoryRange; #[cfg(feature = "std")] -use xous::Result; -use xous::{MemoryRange, Message, send_message}; +use xous::{Message, Result, send_message}; pub enum IframBank { Bank0, @@ -121,8 +121,11 @@ impl IframRange { } } +#[cfg(feature = "std")] use core::sync::atomic::{AtomicU32, Ordering}; +#[cfg(feature = "std")] pub(crate) static REFCOUNT: AtomicU32 = AtomicU32::new(0); +#[cfg(feature = "std")] impl Drop for IframRange { fn drop(&mut self) { // this is all terrible and broken, see https://github.com/betrusted-io/xous-core/issues/482