This is an automated email from the ASF dual-hosted git repository. tisonkun pushed a commit to branch finetune in repository https://gitbox.apache.org/repos/asf/datasketches-rust.git
commit 7e5a71b4efd9a28048d6deea82d1d7bd0b7cbea7 Author: tison <[email protected]> AuthorDate: Thu Aug 6 11:12:15 2026 +0800 chore: fine tune code and settings Signed-off-by: tison <[email protected]> --- .github/workflows/ci.yml | 6 ++---- datasketches/src/cpc/sketch.rs | 5 +---- datasketches/src/cpc/wrapper.rs | 5 +---- 3 files changed, 4 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7a05c83..ebd0d47 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,9 +18,7 @@ name: CI on: pull_request: - branches: [main] - push: - branches: [main] + branches: [ main ] # Concurrency strategy: # github.workflow: distinguish this workflow from others @@ -77,7 +75,7 @@ jobs: needs: msrv strategy: matrix: - os: [ubuntu-24.04, macos-14, windows-2022] + os: [ ubuntu-24.04, macos-14, windows-2022 ] rust-version: ${{ fromJson(needs.msrv.outputs.rust-versions) }} runs-on: ${{ matrix.os }} steps: diff --git a/datasketches/src/cpc/sketch.rs b/datasketches/src/cpc/sketch.rs index d90a08a..071d35f 100644 --- a/datasketches/src/cpc/sketch.rs +++ b/datasketches/src/cpc/sketch.rs @@ -555,10 +555,7 @@ impl CpcSketch { .map_err(insufficient_data("seed_hash"))?; let is_compressed = flags & (1 << FLAG_COMPRESSED) != 0; if !is_compressed { - return Err(Error::new( - ErrorKind::InvalidData, - "only compressed sketches are supported", - )); + return Err(Error::deserial("only compressed sketches are supported")); } let has_hip = flags & (1 << FLAG_HAS_HIP) != 0; let has_table = flags & (1 << FLAG_HAS_TABLE) != 0; diff --git a/datasketches/src/cpc/wrapper.rs b/datasketches/src/cpc/wrapper.rs index fc7093f..77c7223 100644 --- a/datasketches/src/cpc/wrapper.rs +++ b/datasketches/src/cpc/wrapper.rs @@ -78,10 +78,7 @@ impl CpcWrapper { let flags = cursor.read_u8().map_err(insufficient_data("flags"))?; let is_compressed = flags & (1 << FLAG_COMPRESSED) != 0; if !is_compressed { - return Err(Error::new( - ErrorKind::InvalidData, - "only compressed sketches are supported", - )); + return Err(Error::deserial("only compressed sketches are supported")); } let has_hip = flags & (1 << FLAG_HAS_HIP) != 0; let has_table = flags & (1 << FLAG_HAS_TABLE) != 0; --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
