1
0
Fork 0

fixed sync_channel warnings

This commit is contained in:
Simon Renblad 2024-10-17 16:24:12 +08:00
parent 364b0a4bbb
commit e18f77fdea
1 changed files with 2 additions and 2 deletions

View File

@ -37,7 +37,7 @@ impl<'a, T> Sender<'a, T> where T: Clone {
notify_spin_lock(); notify_spin_lock();
if !prev.is_null() { if !prev.is_null() {
unsafe { unsafe {
Box::from_raw(prev); let _ = Box::from_raw(prev);
} }
} }
Ok(()) Ok(())
@ -91,7 +91,7 @@ impl<'a, T> Sender<'a, T> where T: Clone {
for v in self.list.iter() { for v in self.list.iter() {
let original = v.swap(core::ptr::null_mut(), Ordering::Relaxed); let original = v.swap(core::ptr::null_mut(), Ordering::Relaxed);
if !original.is_null() { if !original.is_null() {
Box::from_raw(original); let _ = Box::from_raw(original);
} }
} }
} }