Skip to content

Commit

Permalink
Add clippy to CI (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexpusch authored Oct 26, 2024
1 parent f661e6f commit 5adea75
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
14 changes: 12 additions & 2 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
name: "Test Suite"
on:
push:
pull_request:

env:
RUSTFLAGS: "-Dwarnings"

jobs:
test:
name: cargo test
Expand All @@ -23,4 +25,12 @@ jobs:
with:
components: rustfmt
- name: Rustfmt Check
uses: actions-rust-lang/rustfmt@v1
uses: actions-rust-lang/rustfmt@v1

clippy_check:
name: clippy check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run Clippy
run: cargo clippy --all-targets --all-features
5 changes: 1 addition & 4 deletions src/test_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,7 @@ impl FutureTimings {
pub async fn is_completed(&self, id: i32) -> bool {
let timings = self.0.lock().await;

match timings.get(&id) {
Some(FutureTiming::Completed(_, _)) => true,
_ => false,
}
matches!(timings.get(&id), Some(FutureTiming::Completed(_, _)))
}

pub async fn run_after(&self, id1: i32, id2: i32) -> bool {
Expand Down

0 comments on commit 5adea75

Please sign in to comment.