File tree Expand file tree Collapse file tree 1 file changed +7
-11
lines changed Expand file tree Collapse file tree 1 file changed +7
-11
lines changed Original file line number Diff line number Diff line change @@ -28,16 +28,6 @@ pub struct Shutdown {
28
28
}
29
29
30
30
impl Shutdown {
31
- pub fn new ( ) -> Self {
32
- let cancel_token = CancellationToken :: new ( ) ;
33
- let ( shutdown_complete_tx, shutdown_complete_rx) = mpsc:: channel ( 1 ) ;
34
- Self {
35
- cancel_token,
36
- shutdown_complete_tx,
37
- shutdown_complete_rx : Some ( shutdown_complete_rx) ,
38
- }
39
- }
40
-
41
31
pub fn start ( & self ) {
42
32
self . cancel_token . cancel ( ) ;
43
33
}
@@ -72,7 +62,13 @@ impl Shutdown {
72
62
73
63
impl Default for Shutdown {
74
64
fn default ( ) -> Self {
75
- Shutdown :: new ( )
65
+ let cancel_token = CancellationToken :: new ( ) ;
66
+ let ( shutdown_complete_tx, shutdown_complete_rx) = mpsc:: channel ( 1 ) ;
67
+ Self {
68
+ cancel_token,
69
+ shutdown_complete_tx,
70
+ shutdown_complete_rx : Some ( shutdown_complete_rx) ,
71
+ }
76
72
}
77
73
}
78
74
You can’t perform that action at this time.
0 commit comments