From b0147cd42dc1fec6b37febf4dd02854cb37239c9 Mon Sep 17 00:00:00 2001 From: Simon Renblad Date: Tue, 19 Nov 2024 16:07:56 +0800 Subject: [PATCH] sync_channel: fix Box::from_raw warn --- libcortex_a9/src/sync_channel.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libcortex_a9/src/sync_channel.rs b/libcortex_a9/src/sync_channel.rs index 38c5586..082a606 100644 --- a/libcortex_a9/src/sync_channel.rs +++ b/libcortex_a9/src/sync_channel.rs @@ -37,7 +37,7 @@ impl<'a, T> Sender<'a, T> where T: Clone { notify_spin_lock(); if !prev.is_null() { unsafe { - Box::from_raw(prev); + let _ = Box::from_raw(prev); } } Ok(()) @@ -91,7 +91,7 @@ impl<'a, T> Sender<'a, T> where T: Clone { for v in self.list.iter() { let original = v.swap(core::ptr::null_mut(), Ordering::Relaxed); if !original.is_null() { - Box::from_raw(original); + let _ = Box::from_raw(original); } } }