From cf1b6041106c898cb8b85115e46db06e5f7cbf7b Mon Sep 17 00:00:00 2001 From: charles-r-earp Date: Sat, 27 Jul 2024 22:27:56 -0700 Subject: [PATCH] allow unexpected cfgs clippy --- .github/workflows/ci.yml | 4 ++-- src/tensor.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3779e44..3762d98 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -116,8 +116,8 @@ jobs: env: CARGO_ALIAS_CLIPPYALL: clippy --workspace run: | - cargo hack --feature-powerset --skip default,learn,dataset,iris,mnist clippyall --all-targets -v -- -D warnings - cargo clippy --no-default-features --features iris,mnist --all-targets -v -- -D warnings + cargo hack --feature-powerset --skip default,learn,dataset,iris,mnist clippyall --all-targets -v -- -D warnings -A unexpected_cfgs + cargo clippy --no-default-features --features iris,mnist --all-targets -v -- -D warnings -A unexpected_cfgs - name: rustdoc run: | cargo rustdoc -p autograph_derive -- -D warnings diff --git a/src/tensor.rs b/src/tensor.rs index 3b36f24..3675ab1 100644 --- a/src/tensor.rs +++ b/src/tensor.rs @@ -220,7 +220,7 @@ fn size_of_shape_checked(dim: &D) -> Result { .filter(|&&d| d != 0) .try_fold(1usize, |acc, &d| acc.checked_mul(d)) .ok_or_else(|| ShapeError::from_kind(ErrorKind::Overflow))?; - if size_nonzero > ::std::isize::MAX as usize { + if size_nonzero > isize::MAX as usize { Err(ShapeError::from_kind(ErrorKind::Overflow)) } else { Ok(dim.size())