File tree 2 files changed +10
-15
lines changed
2 files changed +10
-15
lines changed Original file line number Diff line number Diff line change 16
16
steps :
17
17
- uses : actions/checkout@v3
18
18
- uses : dtolnay/rust-toolchain@stable
19
+ - uses : Swatinem/rust-cache@v2
19
20
- run : sudo apt-get install libdbus-1-dev libssl-dev libxdo-dev
20
21
- run : cargo check
21
22
27
28
- uses : dtolnay/rust-toolchain@stable
28
29
with :
29
30
components : rustfmt
31
+ - uses : Swatinem/rust-cache@v2
30
32
- run : sudo apt-get install libdbus-1-dev libssl-dev libxdo-dev
31
33
- run : cargo fmt --all -- --check
32
34
38
40
- uses : dtolnay/rust-toolchain@stable
39
41
with :
40
42
components : clippy
43
+ - uses : Swatinem/rust-cache@v2
41
44
- run : sudo apt-get install libdbus-1-dev libssl-dev libxdo-dev
42
45
- run : cargo clippy -- -D warnings
43
46
82
85
- name : Install Rust Stable
83
86
uses : dtolnay/rust-toolchain@stable
84
87
88
+ - uses : Swatinem/rust-cache@v2
89
+
85
90
- run : sudo apt-get install libdbus-1-dev libssl-dev libxdo-dev
86
91
87
92
- name : Update version
@@ -121,6 +126,8 @@ jobs:
121
126
- name : Install Rust Stable
122
127
uses : dtolnay/rust-toolchain@stable
123
128
129
+ - uses : Swatinem/rust-cache@v2
130
+
124
131
- name : Download Binaries
125
132
uses : actions/download-artifact@v3
126
133
with :
Original file line number Diff line number Diff line change @@ -189,11 +189,7 @@ impl ContinuousShockSender {
189
189
#[ async_trait]
190
190
impl IntoSubsystem < Infallible > for ContinuousShockSender {
191
191
async fn run ( mut self , subsys : SubsystemHandle ) -> Result < ( ) , Infallible > {
192
- match self . main_loop ( ) . cancel_on_shutdown ( & subsys) . await {
193
- Ok ( ( ) ) => { }
194
- Err ( CancelledByShutdown ) => { }
195
- }
196
-
192
+ let _ = self . main_loop ( ) . cancel_on_shutdown ( & subsys) . await ;
197
193
Ok ( ( ) )
198
194
}
199
195
}
@@ -265,11 +261,7 @@ impl IntensityModifier {
265
261
#[ async_trait]
266
262
impl IntoSubsystem < Infallible > for IntensityModifier {
267
263
async fn run ( mut self , subsys : SubsystemHandle ) -> Result < ( ) , Infallible > {
268
- match self . main_loop ( ) . cancel_on_shutdown ( & subsys) . await {
269
- Ok ( ( ) ) => { }
270
- Err ( CancelledByShutdown ) => { }
271
- }
272
-
264
+ let _ = self . main_loop ( ) . cancel_on_shutdown ( & subsys) . await ;
273
265
Ok ( ( ) )
274
266
}
275
267
}
@@ -328,11 +320,7 @@ impl ActivityMonitor {
328
320
#[ async_trait]
329
321
impl IntoSubsystem < Infallible > for ActivityMonitor {
330
322
async fn run ( mut self , subsys : SubsystemHandle ) -> Result < ( ) , Infallible > {
331
- match self . main_loop ( ) . cancel_on_shutdown ( & subsys) . await {
332
- Ok ( ( ) ) => { }
333
- Err ( CancelledByShutdown ) => { }
334
- }
335
-
323
+ let _ = self . main_loop ( ) . cancel_on_shutdown ( & subsys) . await ;
336
324
Ok ( ( ) )
337
325
}
338
326
}
You can’t perform that action at this time.
0 commit comments