From 59fc8709cd5db76aa5d7fff35f6fba119bf998c2 Mon Sep 17 00:00:00 2001 From: Maybe Waffle Date: Sun, 19 Dec 2021 14:42:19 +0300 Subject: [PATCH 1/2] Pin tooling in the CI to a specific version Both Clippy and Rustfmt are pinned to the current latest version (2021-10-19). A `rust-toolchain.toml` file is also created, so the contributors also have the same version. --- .github/workflows/ci.yml | 40 ++++++++++++++++++++-------------------- rust-toolchain.toml | 4 ++++ 2 files changed, 24 insertions(+), 20 deletions(-) create mode 100644 rust-toolchain.toml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 939b0930..87ad95ac 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,6 +9,25 @@ on: name: Continuous integration jobs: + style: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v1 + + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: nightly-2021-12-19 + override: true + components: rustfmt + + - name: fmt + uses: actions-rs/cargo@v1 + with: + command: fmt + args: --all -- --check + test: runs-on: ubuntu-latest strategy: @@ -56,7 +75,7 @@ jobs: - uses: actions-rs/toolchain@v1 with: profile: minimal - toolchain: nightly + toolchain: nightly-2021-12-19 override: true components: clippy @@ -65,22 +84,3 @@ jobs: with: command: clippy args: --all-targets --all-features -- -D warnings - - style: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v1 - - - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: nightly - override: true - components: rustfmt - - - name: fmt - uses: actions-rs/cargo@v1 - with: - command: fmt - args: --all -- --check diff --git a/rust-toolchain.toml b/rust-toolchain.toml new file mode 100644 index 00000000..a3a5f28c --- /dev/null +++ b/rust-toolchain.toml @@ -0,0 +1,4 @@ +[toolchain] +channel = "nightly-2021-12-19" +components = ["rustfmt", "clippy"] +profile = "minimal" From 40a58600855bd4148eb5f240f231262e9be0637e Mon Sep 17 00:00:00 2001 From: Maybe Waffle Date: Sun, 19 Dec 2021 14:56:20 +0300 Subject: [PATCH 2/2] Suppress clippy --- src/lib.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index 333dafac..13d8a213 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -87,6 +87,8 @@ #![cfg_attr(all(feature = "full", docsrs), deny(rustdoc::broken_intra_doc_links))] //#![deny(missing_docs)] #![warn(clippy::print_stdout, clippy::dbg_macro)] +// Unless this becomes machine applicable, I'm not adding 334 #[must_use]s (waffle) +#![allow(clippy::return_self_not_must_use)] // The internal helper macros. #[macro_use]