summaryrefslogtreecommitdiff
path: root/src/rwlock/rwlock.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/rwlock/rwlock.rs')
-rw-r--r--src/rwlock/rwlock.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/rwlock/rwlock.rs b/src/rwlock/rwlock.rs
index 7070b0e..9a7590a 100644
--- a/src/rwlock/rwlock.rs
+++ b/src/rwlock/rwlock.rs
@@ -40,12 +40,6 @@ impl<T, R: RawRwLock> RwLock<T, R> {
}
}
-impl<T: ?Sized + Default, R: RawRwLock> Default for RwLock<T, R> {
- fn default() -> Self {
- Self::new(T::default())
- }
-}
-
impl<T: ?Sized + Debug, R: RawRwLock> Debug for RwLock<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
@@ -68,6 +62,12 @@ impl<T: ?Sized + Debug, R: RawRwLock> Debug for RwLock<T, R> {
}
}
+impl<T: ?Sized + Default, R: RawRwLock> Default for RwLock<T, R> {
+ fn default() -> Self {
+ Self::new(T::default())
+ }
+}
+
impl<T, R: RawRwLock> From<T> for RwLock<T, R> {
fn from(value: T) -> Self {
Self::new(value)