sync: implement Default for watch::Sender (#6626)

This commit is contained in:
Marek Kuskowski
2024-06-10 10:44:45 +02:00
committed by GitHub
parent 341b5daa6e
commit 17555d71d9
+6
View File
@@ -156,6 +156,12 @@ impl<T> Clone for Sender<T> {
}
}
impl<T: Default> Default for Sender<T> {
fn default() -> Self {
Self::new(T::default())
}
}
/// Returns a reference to the inner value.
///
/// Outstanding borrows hold a read lock on the inner value. This means that