diff options
Diffstat (limited to 'src/mutex/mutex.rs')
| -rw-r--r-- | src/mutex/mutex.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mutex/mutex.rs b/src/mutex/mutex.rs index 3b8c221..52b6081 100644 --- a/src/mutex/mutex.rs +++ b/src/mutex/mutex.rs @@ -43,12 +43,6 @@ impl<T, R: RawMutex> Mutex<T, R> { } } -impl<T: ?Sized + Default, R: RawMutex> Default for Mutex<T, R> { - fn default() -> Self { - Self::new(T::default()) - } -} - impl<T: ?Sized + Debug, R: RawMutex> Debug for Mutex<T, R> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { // safety: this is just a try lock, and the value is dropped @@ -71,6 +65,12 @@ impl<T: ?Sized + Debug, R: RawMutex> Debug for Mutex<T, R> { } } +impl<T: ?Sized + Default, R: RawMutex> Default for Mutex<T, R> { + fn default() -> Self { + Self::new(T::default()) + } +} + impl<T, R: RawMutex> From<T> for Mutex<T, R> { fn from(value: T) -> Self { Self::new(value) |
