diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ecd60eb..7a2b9d5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,6 +16,7 @@ jobs: steps: - uses: actions/checkout@v3 - uses: dtolnay/rust-toolchain@stable + - uses: Swatinem/rust-cache@v2 - run: sudo apt-get install libdbus-1-dev libssl-dev libxdo-dev - run: cargo check @@ -27,6 +28,7 @@ jobs: - uses: dtolnay/rust-toolchain@stable with: components: rustfmt + - uses: Swatinem/rust-cache@v2 - run: sudo apt-get install libdbus-1-dev libssl-dev libxdo-dev - run: cargo fmt --all -- --check @@ -38,6 +40,7 @@ jobs: - uses: dtolnay/rust-toolchain@stable with: components: clippy + - uses: Swatinem/rust-cache@v2 - run: sudo apt-get install libdbus-1-dev libssl-dev libxdo-dev - run: cargo clippy -- -D warnings @@ -82,6 +85,8 @@ jobs: - name: Install Rust Stable uses: dtolnay/rust-toolchain@stable + - uses: Swatinem/rust-cache@v2 + - run: sudo apt-get install libdbus-1-dev libssl-dev libxdo-dev - name: Update version @@ -121,6 +126,8 @@ jobs: - name: Install Rust Stable uses: dtolnay/rust-toolchain@stable + - uses: Swatinem/rust-cache@v2 + - name: Download Binaries uses: actions/download-artifact@v3 with: diff --git a/src/plugins/pishock.rs b/src/plugins/pishock.rs index 63e4550..8ebd361 100644 --- a/src/plugins/pishock.rs +++ b/src/plugins/pishock.rs @@ -189,11 +189,7 @@ impl ContinuousShockSender { #[async_trait] impl IntoSubsystem for ContinuousShockSender { async fn run(mut self, subsys: SubsystemHandle) -> Result<(), Infallible> { - match self.main_loop().cancel_on_shutdown(&subsys).await { - Ok(()) => {} - Err(CancelledByShutdown) => {} - } - + let _ = self.main_loop().cancel_on_shutdown(&subsys).await; Ok(()) } } @@ -265,11 +261,7 @@ impl IntensityModifier { #[async_trait] impl IntoSubsystem for IntensityModifier { async fn run(mut self, subsys: SubsystemHandle) -> Result<(), Infallible> { - match self.main_loop().cancel_on_shutdown(&subsys).await { - Ok(()) => {} - Err(CancelledByShutdown) => {} - } - + let _ = self.main_loop().cancel_on_shutdown(&subsys).await; Ok(()) } } @@ -328,11 +320,7 @@ impl ActivityMonitor { #[async_trait] impl IntoSubsystem for ActivityMonitor { async fn run(mut self, subsys: SubsystemHandle) -> Result<(), Infallible> { - match self.main_loop().cancel_on_shutdown(&subsys).await { - Ok(()) => {} - Err(CancelledByShutdown) => {} - } - + let _ = self.main_loop().cancel_on_shutdown(&subsys).await; Ok(()) } }