Please impl Default for watch::Sender<T> where T: Default
#6623
Labels
A-tokio
Area: The main tokio crate
C-feature-request
Category: A feature request.
E-easy
Call for participation: Experience needed to fix: Easy / not much
E-help-wanted
Call for participation: Help is requested to fix this issue.
M-sync
Module: tokio/sync
For types like
watch::Sender<Option<...>>
, it'd be convenient ifSender
implementedDefault
if its contents did:This would allow, for instance, using
.or_default()
in theHashMap
/DashMap
Entry
API, rather than.or_insert_with(|| watch::Sender::new(None))
.The text was updated successfully, but these errors were encountered: