mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-24 00:00:11 +02:00
sync: implement Default for watch::Sender (#6626)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user