Skip to content

Commit 7f021a5

Browse files
author
rusty
committed
Impl Default trait for StopSource
1 parent 962e3ae commit 7f021a5

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/cancellation.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,12 @@ impl StopSource {
3939
}
4040
}
4141

42+
impl Default for StopSource {
43+
fn default() -> Self {
44+
Self::new()
45+
}
46+
}
47+
4248
impl Drop for StopSource {
4349
fn drop(&mut self) {
4450
self.stopped.store(true, Ordering::SeqCst);

0 commit comments

Comments
 (0)