Skip to content

Commit

Permalink
Adding clippy linter as GitHub action
Browse files Browse the repository at this point in the history
  • Loading branch information
andreev-io committed Dec 16, 2021
1 parent 3e5856c commit e4dd247
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 22 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/clippy_check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
on: push
name: Clippy check
jobs:
clippy_check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
components: clippy
override: true
1 change: 1 addition & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@ jobs:
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose

13 changes: 2 additions & 11 deletions little_raft/tests/raft_stable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -246,10 +246,7 @@ fn run_arithmetic_operation_on_cluster(
.lock()
.unwrap()
.pending_transitions
.push(ArithmeticOperation {
delta,
id,
});
.push(ArithmeticOperation { delta, id });
transition_notifiers[cluster.id]
.send(())
.expect("could not send transition notification");
Expand Down Expand Up @@ -335,13 +332,7 @@ fn run_replicas() {
3,
);

run_arithmetic_operation_on_cluster(
clusters.clone(),
state_machines,
transition_tx,
3,
4,
);
run_arithmetic_operation_on_cluster(clusters.clone(), state_machines, transition_tx, 3, 4);

halt_clusters(clusters);

Expand Down
13 changes: 2 additions & 11 deletions little_raft/tests/raft_unstable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -246,10 +246,7 @@ fn run_arithmetic_operation_on_cluster(
.lock()
.unwrap()
.pending_transitions
.push(ArithmeticOperation {
delta,
id,
});
.push(ArithmeticOperation { delta, id });
transition_notifiers[cluster.id]
.send(())
.expect("could not send transition notification");
Expand Down Expand Up @@ -342,13 +339,7 @@ fn run_replicas() {
3,
);

run_arithmetic_operation_on_cluster(
clusters.clone(),
state_machines,
transition_tx,
3,
4,
);
run_arithmetic_operation_on_cluster(clusters.clone(), state_machines, transition_tx, 3, 4);

halt_clusters(clusters);

Expand Down

0 comments on commit e4dd247

Please sign in to comment.