diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index a2523de7..7fb91b02 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -64,7 +64,7 @@ jobs: - name: Check for clippy hints if: ${{ matrix.rust == 'stable' }} - run: cargo clippy -- -D warnings + run: cargo clippy --workspace --all-targets -- -D warnings # This fails on 1.64, but works on 1.66 and later. # https://github.com/rust-lang/rust/issues/103306 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 59ae0262..f8a19653 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -33,11 +33,11 @@ cargo test --all cargo bench ``` -It's a good idea to run clippy and fix any warnings as well: +It's a good idea to run `clippy` and fix any warnings as well: ``` -rustup component add clippy-preview -cargo clippy --all +rustup component add clippy +cargo clippy --workspace --all-targets ``` Finally, run Rustfmt to maintain a common code style: diff --git a/plot/src/axis.rs b/plot/src/axis.rs index 4f068b15..5f7ae494 100644 --- a/plot/src/axis.rs +++ b/plot/src/axis.rs @@ -155,9 +155,6 @@ where } impl<'a> Script for (Axis, &'a Properties) { - // Allow clippy::format_push_string even with older versions of rust (<1.62) which - // don't have it defined. - #[allow(clippy::all)] fn script(&self) -> String { let &(axis, properties) = self; let axis_ = axis.display(); diff --git a/plot/src/candlestick.rs b/plot/src/candlestick.rs index d1754e8c..e0a5cbeb 100644 --- a/plot/src/candlestick.rs +++ b/plot/src/candlestick.rs @@ -27,9 +27,6 @@ impl Default for Properties { } impl Script for Properties { - // Allow clippy::format_push_string even with older versions of rust (<1.62) which - // don't have it defined. - #[allow(clippy::all)] fn script(&self) -> String { let mut script = String::from("with candlesticks "); diff --git a/plot/src/curve.rs b/plot/src/curve.rs index a5766ee5..bbddeff1 100644 --- a/plot/src/curve.rs +++ b/plot/src/curve.rs @@ -38,9 +38,6 @@ impl CurveDefault