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 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..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)] @@ -78,10 +77,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;