You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datasketches.apache.org by ti...@apache.org on 2026/05/07 01:33:32 UTC
(datasketches-rust) 11/11: fixup docs
This is an automated email from the ASF dual-hosted git repository.
tisonkun pushed a commit to branch hashable
in repository https://gitbox.apache.org/repos/asf/datasketches-rust.git
commit 6daa7a277541e0c1254f31884e4950c33e5b517f
Author: tison <wa...@gmail.com>
AuthorDate: Thu May 7 09:31:58 2026 +0800
fixup docs
Signed-off-by: tison <wa...@gmail.com>
---
datasketches/src/hash_value/canonical.rs | 23 ++++++++++-------------
1 file changed, 10 insertions(+), 13 deletions(-)
diff --git a/datasketches/src/hash_value/canonical.rs b/datasketches/src/hash_value/canonical.rs
index 2966056..05bf841 100644
--- a/datasketches/src/hash_value/canonical.rs
+++ b/datasketches/src/hash_value/canonical.rs
@@ -344,8 +344,8 @@ impl_canonical_number!(u64, canonical_u64, |v| v);
/// Slice canonicalization hashes the raw bytes of the vector without Rust's slice length prefix.
/// This matches the datasketches-cpp raw byte update path used by sketches.
///
-/// Empty byte vectors have zero bytes to hash. Use [`is_empty`](Canonical::<Vec<u8>>::is_empty) to
-/// skip empty values before updating a sketch if you need to mirror datasketches-cpp's empty slice
+/// Empty byte vectors have zero bytes to hash. Use [`Canonical::<Vec<u8>>::is_empty`] to skip
+/// empty values before updating a sketch if you need to mirror datasketches-cpp's empty slice
/// behavior.
///
/// # Examples
@@ -382,7 +382,7 @@ impl Hash for Canonical<Vec<u8>> {
impl Canonical<Vec<u8>> {
/// Returns `true` if this value has a length of zero bytes.
///
- /// datasketches-cpp ignores empty strings before hashing. Check this method before
+ /// datasketches-cpp ignores empty slices before hashing. Check this method before
/// updating a sketch when matching that behavior matters.
///
/// # Examples
@@ -404,9 +404,8 @@ impl Canonical<Vec<u8>> {
/// prefix. This matches the datasketches-cpp `std::string` update path, which hashes `c_str()` with
/// the string length.
///
-/// Empty strings have zero bytes to hash. Use [`is_empty`](Canonical::<String>::is_empty) to skip
-/// empty values before updating a sketch if you need to mirror datasketches-cpp's empty string
-/// behavior.
+/// Empty strings have zero bytes to hash. Use [`Canonical::<String>::is_empty`] to skip empty
+/// values before updating a sketch if you need to mirror datasketches-cpp's empty string behavior.
///
/// # Examples
///
@@ -463,9 +462,8 @@ impl Canonical<String> {
/// Slice canonicalization hashes the raw bytes of the slice without Rust's slice length prefix.
/// This matches the datasketches-cpp raw byte update path used by sketches.
///
-/// Empty byte slices have zero bytes to hash. Use [`is_empty`](Canonical::<&[u8]>::is_empty) to
-/// skip empty values before updating a sketch if you need to mirror datasketches-cpp's empty slice
-/// behavior.
+/// Empty byte slices have zero bytes to hash. Use [`Canonical::<&[u8]>::is_empty`] to skip empty
+/// values before updating a sketch if you need to mirror datasketches-cpp's empty slice behavior.
///
/// # Examples
///
@@ -501,7 +499,7 @@ impl Hash for Canonical<&[u8]> {
impl Canonical<&[u8]> {
/// Returns `true` if this value has a length of zero bytes.
///
- /// datasketches-cpp ignores empty strings before hashing. Check this method before
+ /// datasketches-cpp ignores empty slices before hashing. Check this method before
/// updating a sketch when matching that behavior matters.
///
/// # Examples
@@ -523,9 +521,8 @@ impl Canonical<&[u8]> {
/// prefix. This matches the datasketches-cpp `std::string` update path, which hashes `c_str()` with
/// the string length.
///
-/// Empty string slices have zero bytes to hash. Use [`is_empty`](Canonical::<&str>::is_empty) to
-/// skip empty values before updating a sketch if you need to mirror datasketches-cpp's empty string
-/// behavior.
+/// Empty string slices have zero bytes to hash. Use [`Canonical::<&str>::is_empty`] to skip empty
+/// values before updating a sketch if you need to mirror datasketches-cpp's empty string behavior.
///
/// # Examples
///
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datasketches.apache.org
For additional commands, e-mail: commits-help@datasketches.apache.org