Skip to content

Commit

Permalink
chore: fix clippy (#313)
Browse files Browse the repository at this point in the history
* update ci to use rust-toolchain

* update dep in the examples
  • Loading branch information
sehz authored Aug 19, 2024
1 parent fd3500a commit c5a31c4
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 27 deletions.
21 changes: 6 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,8 @@ jobs:
rust: [stable]
steps:
- uses: actions/checkout@v4
- name: Install ${{ matrix.rust }}
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
override: true
- name: Install Rust stable
uses: dtolnay/rust-toolchain@stable
- name: check fmt
run: make check-fmt RUSTV=${{ matrix.rust }}

Expand All @@ -42,11 +39,8 @@ jobs:
rust: [stable]
steps:
- uses: actions/checkout@v4
- name: Install ${{ matrix.rust }}
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
profile: minimal
- name: Install Rust stable
uses: dtolnay/rust-toolchain@stable
- name: check clippy
run: make check-clippy

Expand All @@ -62,11 +56,8 @@ jobs:
node-version: [ '16', '18', '20' ]
steps:
- uses: actions/checkout@v4
- name: Install ${{ matrix.rust }}
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
override: true
- name: Install Rust stable
uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
with:
key: ${{ matrix.os }}
Expand Down
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ check-clippy: install-clippy check-clippy-examples
cargo clippy --all --all-features -- \
-D warnings \
-A clippy::upper_case_acronyms \
-A clippy::needless-question-mark
-A clippy::needless-question-mark \
-A clippy::macro-metavars-in-unsafe

check-clippy-examples: install-clippy
make -C examples check-clippy
29 changes: 20 additions & 9 deletions examples/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions examples/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ members = [
[workspace.dependencies]
serde = { version = "1.0.110", features = ["derive"] }
serde_json = "1.0.53"
futures-lite = "1.7.0"
futures-lite = "2.0.0"
uuid = "1.8.0"
tracing = "0.1.37"

node-bindgen = { path = "..", features = ["default"]}
fluvio-future = { version = "0.6.0", features = ["timer"] }
fluvio-future = { version = "0.7.0", features = ["timer"] }
1 change: 1 addition & 0 deletions examples/class-async/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ use node_bindgen::core::val::JsEnv;
use node_bindgen::core::TryIntoJs;
use node_bindgen::derive::node_bindgen;

#[allow(dead_code)]
pub struct MyJson {
val: f64,
}
Expand Down

0 comments on commit c5a31c4

Please sign in to comment.