Skip to content

Commit 22c5391

Browse files
rustypbzweihander
authored andcommitted
Impl Default trait for StopSource
1 parent d23be8e commit 22c5391

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)