This is an automated email from the ASF dual-hosted git repository.

tisonkun pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/datasketches-rust.git


The following commit(s) were added to refs/heads/main by this push:
     new 5f2e809  chore: fine tune code and settings (#184)
5f2e809 is described below

commit 5f2e8095f8f3d013cf99136aafa571be823ba31f
Author: tison <[email protected]>
AuthorDate: Thu Aug 6 12:00:03 2026 +0800

    chore: fine tune code and settings (#184)
    
    Signed-off-by: tison <[email protected]>
---
 .asf.yaml                       | 2 +-
 .github/workflows/ci.yml        | 6 ++----
 datasketches/src/cpc/sketch.rs  | 5 +----
 datasketches/src/cpc/wrapper.rs | 6 +-----
 4 files changed, 5 insertions(+), 14 deletions(-)

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;


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to