From 8d729cee0186950e6b21aae8affe75439402be9d Mon Sep 17 00:00:00 2001 From: buncram Date: Mon, 29 Jan 2024 02:06:32 +0800 Subject: [PATCH] cleanup warnings in ifram --- libs/cramium-hal/src/ifram.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/libs/cramium-hal/src/ifram.rs b/libs/cramium-hal/src/ifram.rs index 9f32d907f..636a8e6f6 100644 --- a/libs/cramium-hal/src/ifram.rs +++ b/libs/cramium-hal/src/ifram.rs @@ -1,4 +1,6 @@ -use xous::{send_message, MemoryRange, Message, Result}; +#[cfg(feature = "std")] +use xous::Result; +use xous::{send_message, MemoryRange, Message}; pub enum IframBank { Bank0, @@ -147,12 +149,12 @@ impl Drop for IframRange { ), ) { Ok(_) => (), - Err(e) => { + Err(_e) => { // This probably never happens, but also probably doesn't need to be a hard-panic // if it does happen because it simply degrades performance; it does not impact // correctness. #[cfg(feature = "std")] - log::error!("Couldn't de-allocate IframRange: {:?}, IFRAM memory is leaking!", e) + log::error!("Couldn't de-allocate IframRange: {:?}, IFRAM memory is leaking!", _e) } } // de-allocate myself. It's unsafe because we are responsible to make sure nobody else is using