Merge #1068
1068: Add Default to some types r=Dirbaio a=mkj These are a couple of places I've found `Default` to be handy Co-authored-by: Matt Johnston <matt@ucc.asn.au>
This commit is contained in:
commit
61be0e75c8
@ -56,6 +56,15 @@ where
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl<M, T> Default for Signal<M, T>
|
||||||
|
where
|
||||||
|
M: RawMutex,
|
||||||
|
{
|
||||||
|
fn default() -> Self {
|
||||||
|
Self::new()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl<M, T: Send> Signal<M, T>
|
impl<M, T: Send> Signal<M, T>
|
||||||
where
|
where
|
||||||
M: RawMutex,
|
M: RawMutex,
|
||||||
|
@ -6,7 +6,7 @@ use crate::blocking_mutex::raw::CriticalSectionRawMutex;
|
|||||||
use crate::blocking_mutex::Mutex;
|
use crate::blocking_mutex::Mutex;
|
||||||
|
|
||||||
/// Utility struct to register and wake a waker.
|
/// Utility struct to register and wake a waker.
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Default)]
|
||||||
pub struct WakerRegistration {
|
pub struct WakerRegistration {
|
||||||
waker: Option<Waker>,
|
waker: Option<Waker>,
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user