From 7e5a71b4efd9a28048d6deea82d1d7bd0b7cbea7 Mon Sep 17 00:00:00 2001 From: tison Date: Thu, 6 Aug 2026 11:12:15 +0800 Subject: [PATCH 1/3] chore: fine tune code and settings Signed-off-by: tison --- .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; From ba8fd347247db6ace8b27f6a33a37008443a55fa Mon Sep 17 00:00:00 2001 From: tison Date: Thu, 6 Aug 2026 11:14:57 +0800 Subject: [PATCH 2/3] Enable committers to do CTR --- .asf.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.asf.yaml b/.asf.yaml index 7f77f51..f10d7dc 100644 --- a/.asf.yaml +++ b/.asf.yaml @@ -42,7 +42,7 @@ github: contexts: - Required required_pull_request_reviews: - required_approving_review_count: 1 + required_approving_review_count: 0 dependabot_alerts: true dependabot_updates: false From 78e676d4f3b4eca18e56059f14d79032f30e77d6 Mon Sep 17 00:00:00 2001 From: tison Date: Thu, 6 Aug 2026 11:16:58 +0800 Subject: [PATCH 3/3] fixup Signed-off-by: tison --- datasketches/src/cpc/wrapper.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/datasketches/src/cpc/wrapper.rs b/datasketches/src/cpc/wrapper.rs index 77c7223..6fb1ad9 100644 --- a/datasketches/src/cpc/wrapper.rs +++ b/datasketches/src/cpc/wrapper.rs @@ -33,7 +33,6 @@ use crate::cpc::serialization::FLAG_HAS_WINDOW; use crate::cpc::serialization::SERIAL_VERSION; use crate::cpc::serialization::make_preamble_ints; use crate::error::Error; -use crate::error::ErrorKind; /// A read-only view of a serialized image of a CpcSketch. #[derive(Debug, Clone)]