A runtime for writing reliable asynchronous applications with Rust. Provides I/O, networking, scheduling, timers, ...
25.44k
stars
2.3k
forks
source link
Please `impl Default for watch::Sender<T> where T: Default` #6623
Closed
joshtriplett closed 4 weeks ago
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))
.