diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index c34bd59..b59606a 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -22,14 +22,6 @@ jobs: rustup toolchain install ${{ matrix.rust }} --profile=minimal rustup override set ${{ matrix.rust }} - - name: Install rustfmt + clippy - if: matrix.rust == 'stable' - run: | - # remove non-rustup-managed versions already present in default image - rm -f /home/runner/.cargo/bin/{rustfmt,cargo-fmt} - - rustup toolchain install ${{ matrix.rust }} --profile=minimal --component=clippy,rustfmt - - name: Check Fmt if: matrix.rust == 'stable' run: cargo fmt --check diff --git a/src/lib.rs b/src/lib.rs index 00d64a7..f3f5b44 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1911,7 +1911,7 @@ impl Error for ParseNotNanError { impl fmt::Display for ParseNotNanError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { match self { - ParseNotNanError::ParseFloatError(e) => write!(f, "Parse error: {}", e), + ParseNotNanError::ParseFloatError(e) => write!(f, "Parse error: {e}"), ParseNotNanError::IsNaN => write!(f, "NotNan parser encounter a NaN"), } } @@ -2333,7 +2333,7 @@ mod impl_speedy { fn read_from>(reader: &mut R) -> Result { let value: T = reader.read_value()?; Self::new(value).map_err(|error| { - speedy::Error::custom(std::format!("failed to read NotNan: {}", error)).into() + speedy::Error::custom(std::format!("failed to read NotNan: {error}")).into() }) } diff --git a/tests/test.rs b/tests/test.rs index 3efa017..6ae7295 100644 --- a/tests/test.rs +++ b/tests/test.rs @@ -475,7 +475,7 @@ fn hash_is_good_for_whole_numbers() { // many, but should guard against transient issues // that will result from using RandomState let pct_unique = set.len() as f64 / limit as f64; - assert!(0.99f64 < pct_unique, "percent-unique={}", pct_unique); + assert!(0.99f64 < pct_unique, "percent-unique={pct_unique}"); } #[test] @@ -494,7 +494,7 @@ fn hash_is_good_for_fractional_numbers() { // many, but should guard against transient issues // that will result from using RandomState let pct_unique = set.len() as f64 / limit as f64; - assert!(0.99f64 < pct_unique, "percent-unique={}", pct_unique); + assert!(0.99f64 < pct_unique, "percent-unique={pct_unique}"); } #[test]