Skip to content

Commit

Permalink
Try to fix CI for 1.64
Browse files Browse the repository at this point in the history
  • Loading branch information
juntyr committed Aug 8, 2024
1 parent 6cdb41e commit 227d35f
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 12 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,15 @@ jobs:
uses: taiki-e/install-action@cargo-hack

- name: Check the code style powerset
if: ${{ matrix.rust == "stable" }}
run: |
cargo hack clippy --all \
--feature-powerset --keep-going \
-- -D warnings
- name: Check the code style powerset
if: ${{ matrix.rust != "stable" }}
run: |
cargo hack clippy --all \
--feature-powerset --keep-going \
-- -D warnings -A unknown-lints
14 changes: 8 additions & 6 deletions codecs/zlib/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,11 @@ impl Codec for ZlibCodec {
}

fn decode(&self, encoded: AnyCowArray) -> Result<AnyArray, Self::Error> {
let AnyCowArray::U8(encoded) = encoded else {
return Err(ZlibCodecError::EncodedDataNotBytes {
let encoded = match encoded {
AnyCowArray::U8(encoded) => encoded,
encoded => return Err(ZlibCodecError::EncodedDataNotBytes {
dtype: encoded.dtype(),
});
}),
};

if !matches!(encoded.shape(), [_]) {
Expand All @@ -81,10 +82,11 @@ impl Codec for ZlibCodec {
encoded: AnyArrayView,
decoded: AnyArrayViewMut,
) -> Result<(), Self::Error> {
let AnyArrayView::U8(encoded) = encoded else {
return Err(ZlibCodecError::EncodedDataNotBytes {
let encoded = match encoded {
AnyArrayView::U8(encoded) => encoded,
encoded => return Err(ZlibCodecError::EncodedDataNotBytes {
dtype: encoded.dtype(),
});
}),
};

if !matches!(encoded.shape(), [_]) {
Expand Down
14 changes: 8 additions & 6 deletions codecs/zstd/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,11 @@ impl Codec for ZstdCodec {
}

fn decode(&self, encoded: AnyCowArray) -> Result<AnyArray, Self::Error> {
let AnyCowArray::U8(encoded) = encoded else {
return Err(ZstdCodecError::EncodedDataNotBytes {
let encoded = match encoded {
AnyCowArray::U8(encoded) => encoded,
encoded => return Err(ZstdCodecError::EncodedDataNotBytes {
dtype: encoded.dtype(),
});
}),
};

if !matches!(encoded.shape(), [_]) {
Expand All @@ -65,10 +66,11 @@ impl Codec for ZstdCodec {
encoded: AnyArrayView,
decoded: AnyArrayViewMut,
) -> Result<(), Self::Error> {
let AnyArrayView::U8(encoded) = encoded else {
return Err(ZstdCodecError::EncodedDataNotBytes {
let encoded = match encoded {
AnyArrayView::U8(encoded) => encoded,
encoded => return Err(ZstdCodecError::EncodedDataNotBytes {
dtype: encoded.dtype(),
});
}),
};

if !matches!(encoded.shape(), [_]) {
Expand Down

0 comments on commit 227d35f

Please sign in to comment.