Skip to content

Commit a3c42e1

Browse files
committed
chore: fix clippy issues
1 parent 01743f4 commit a3c42e1

File tree

2 files changed

+10
-15
lines changed

2 files changed

+10
-15
lines changed

.github/workflows/release.yml

+7
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ jobs:
1616
steps:
1717
- uses: actions/checkout@v3
1818
- uses: dtolnay/rust-toolchain@stable
19+
- uses: Swatinem/rust-cache@v2
1920
- run: sudo apt-get install libdbus-1-dev libssl-dev libxdo-dev
2021
- run: cargo check
2122

@@ -27,6 +28,7 @@ jobs:
2728
- uses: dtolnay/rust-toolchain@stable
2829
with:
2930
components: rustfmt
31+
- uses: Swatinem/rust-cache@v2
3032
- run: sudo apt-get install libdbus-1-dev libssl-dev libxdo-dev
3133
- run: cargo fmt --all -- --check
3234

@@ -38,6 +40,7 @@ jobs:
3840
- uses: dtolnay/rust-toolchain@stable
3941
with:
4042
components: clippy
43+
- uses: Swatinem/rust-cache@v2
4144
- run: sudo apt-get install libdbus-1-dev libssl-dev libxdo-dev
4245
- run: cargo clippy -- -D warnings
4346

@@ -82,6 +85,8 @@ jobs:
8285
- name: Install Rust Stable
8386
uses: dtolnay/rust-toolchain@stable
8487

88+
- uses: Swatinem/rust-cache@v2
89+
8590
- run: sudo apt-get install libdbus-1-dev libssl-dev libxdo-dev
8691

8792
- name: Update version
@@ -121,6 +126,8 @@ jobs:
121126
- name: Install Rust Stable
122127
uses: dtolnay/rust-toolchain@stable
123128

129+
- uses: Swatinem/rust-cache@v2
130+
124131
- name: Download Binaries
125132
uses: actions/download-artifact@v3
126133
with:

src/plugins/pishock.rs

+3-15
Original file line numberDiff line numberDiff line change
@@ -189,11 +189,7 @@ impl ContinuousShockSender {
189189
#[async_trait]
190190
impl IntoSubsystem<Infallible> for ContinuousShockSender {
191191
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;
197193
Ok(())
198194
}
199195
}
@@ -265,11 +261,7 @@ impl IntensityModifier {
265261
#[async_trait]
266262
impl IntoSubsystem<Infallible> for IntensityModifier {
267263
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;
273265
Ok(())
274266
}
275267
}
@@ -328,11 +320,7 @@ impl ActivityMonitor {
328320
#[async_trait]
329321
impl IntoSubsystem<Infallible> for ActivityMonitor {
330322
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;
336324
Ok(())
337325
}
338326
}

0 commit comments

Comments
 (0)