1
0
Fork 0

fix sync_channel warnings

This commit is contained in:
Simon Renblad 2024-10-17 16:24:12 +08:00
parent 817185d319
commit fd8c4b9744
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();
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);
}
}
}