Skip to content

Commit

Permalink
chore: fix clippy issues
Browse files Browse the repository at this point in the history
  • Loading branch information
DASPRiD committed Oct 26, 2024
1 parent 0b00a98 commit ff26d7c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 15 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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

Expand All @@ -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

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down
18 changes: 3 additions & 15 deletions src/plugins/pishock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -189,11 +189,7 @@ impl ContinuousShockSender {
#[async_trait]
impl IntoSubsystem<Infallible> 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(())
}
}
Expand Down Expand Up @@ -265,11 +261,7 @@ impl IntensityModifier {
#[async_trait]
impl IntoSubsystem<Infallible> 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(())
}
}
Expand Down Expand Up @@ -328,11 +320,7 @@ impl ActivityMonitor {
#[async_trait]
impl IntoSubsystem<Infallible> 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(())
}
}
Expand Down

0 comments on commit ff26d7c

Please sign in to comment.