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/07/25 13:45:41 UTC
(datasketches-rust) 11/13: refactor(theta): use plural bytes_used accessor
This is an automated email from the ASF dual-hosted git repository.
tisonkun pushed a commit to branch codex/naming-drift-audit
in repository https://gitbox.apache.org/repos/asf/datasketches-rust.git
commit b0d38fb1eb0d2508e75b141d1b1dbabfd4d049fd
Author: tison <wa...@gmail.com>
AuthorDate: Sat Jul 25 21:43:18 2026 +0800
refactor(theta): use plural bytes_used accessor
---
datasketches/src/theta/bit_pack.rs | 4 ++--
datasketches/src/theta/sketch.rs | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/datasketches/src/theta/bit_pack.rs b/datasketches/src/theta/bit_pack.rs
index 2271ea2..d64e59e 100644
--- a/datasketches/src/theta/bit_pack.rs
+++ b/datasketches/src/theta/bit_pack.rs
@@ -48,8 +48,8 @@ impl<'a> BitPacker<'a> {
}
}
- /// Return used number of byte.
- pub fn byte_used(&self) -> usize {
+ /// Return the number of bytes used.
+ pub fn bytes_used(&self) -> usize {
if self.byte_bit_used == 0 {
self.byte_index
} else {
diff --git a/datasketches/src/theta/sketch.rs b/datasketches/src/theta/sketch.rs
index 0ccbf61..ed354b2 100644
--- a/datasketches/src/theta/sketch.rs
+++ b/datasketches/src/theta/sketch.rs
@@ -537,7 +537,7 @@ impl CompactThetaSketch {
packer.pack_value(delta, entry_bits);
i += 1;
}
- let bytes_used = packer.byte_used();
+ let bytes_used = packer.bytes_used();
bytes.write(&block[0..bytes_used]);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datasketches.apache.org
For additional commands, e-mail: commits-help@datasketches.apache.org