fix clippy errors #21
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
push: | |
pull_request: | |
jobs: | |
rust-fmt: | |
name: Format Rust code | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Cargo fmt | |
run: cargo fmt --all -- --check | |
rust: | |
name: Lint Rust code | |
strategy: | |
matrix: | |
features: | |
- "" | |
- "-F rkyv" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Cargo clippy | |
run: cargo clippy --workspace --all-targets --no-default-features ${{ matrix.features }} -- -D warnings | |
- name: Cargo test | |
run: cargo test --workspace --no-default-features ${{ matrix.features }} | |
rust-msrv: | |
name: Build-test MSRV (1.74) with minimal crate dependencies | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
features: | |
- "" | |
- "-F rkyv" | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@nightly | |
- name: Generate minimal-version dependencies | |
run: cargo -Zminimal-versions generate-lockfile | |
- name: Fixup minimal versions in broken crates | |
run: | | |
# Crates like serde-xml-rs don't test their minimal-versions | |
cargo update -p log --precise 0.4.4 | |
cargo update -p thiserror --precise 1.0.2 | |
- uses: dtolnay/[email protected] | |
- name: Cargo check | |
run: cargo check --workspace --all-targets --no-default-features ${{ matrix.features }} |