forked from M-Labs/zynq-rs
fix sync_channel warnings
This commit is contained in:
parent
817185d319
commit
fd8c4b9744
|
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue