Add an Default impl for Lock

This commit is contained in:
John Kåre Alsaker 2018-03-14 20:13:42 +01:00
parent 697d3bee96
commit 8e5eb025a2

View file

@ -333,6 +333,13 @@ impl<T> Lock<T> {
}
}
impl<T: Default> Default for Lock<T> {
#[inline]
fn default() -> Self {
Lock::new(T::default())
}
}
// FIXME: Probably a bad idea
impl<T: Clone> Clone for Lock<T> {
#[inline]