Skip to content

chore: code audit — DRY constructors, atomic serde ordering - #12

Merged
MovAh13h merged 1 commit into
masterfrom
chore/code-audit
May 13, 2026
Merged

MovAh13h merged 1 commit into
masterfrom
chore/code-audit

Conversation

@MovAh13h

Copy link
Copy Markdown
Owner

Fixes found during full codebase audit.

  • Extracted validated_params(capacity, fpr) and validated_with_params(slots, hash_fns) into math.rs — eliminates identical validation + computation blocks duplicated across BloomFilter, CountingBloomFilter, and AtomicBloomFilter
  • Fixed AtomicBloomFilter serde: serialize used SeqCst unnecessarily — Relaxed is correct since serialization is single-threaded
  • Documented optimal_bit_count 64-bit floor and ScalableBloomFilter::add_slice panic behaviour on capacity overflow

@MovAh13h
MovAh13h merged commit cf50372 into master May 13, 2026
@MovAh13h
MovAh13h deleted the chore/code-audit branch May 13, 2026 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant