Skip to content

Releases: coriolinus/counter-rs

v0.7.0 - custom hashers

13 Aug 20:58
5fe3b55

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v0.6.0...v0.7.0

v0.6.0

30 Jun 11:25
01637a6

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v0.5.7...v0.5.8

v0.5.7: Counters are Multisets

12 Oct 14:05

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v0.5.6...v0.5.7

v0.5.6: `k_most_common_items` and more relaxed trait bounds

16 Jul 10:42

Choose a tag to compare

What's Changed

Full Changelog: v0.5.5...v0.5.6

v0.5.5: Relax trait bounds, add `.total()` method

05 May 20:08

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v0.5.4...v0.5.5

v0.5.4: Relax trait bounds for `Default`

02 Apr 17:44

Choose a tag to compare

What's Changed

  • Relax trait bounds for Default implementation by @jonasbb in #19

New Contributors

Full Changelog: v0.5.3...v0.5.4

more iterators and relax trait bounds

07 Feb 16:07

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v0.5.2...v0.5.3

impl Extend, IntoIterator for Counter

23 Jun 12:22

Choose a tag to compare

Implementing these traits gives users more ways to usefully combine their counts.

Remove unnecessary cloning

19 May 11:19
f7f7b71

Choose a tag to compare

This release removes self-cloning from the Add, Sub, and BitOr impls.
This also fixes a number of other clippy, minor clippy lints.

Implicit zero for unknown entries

19 May 09:03

Choose a tag to compare

Counters now implement Index and IndexMut, so they can have implicit zero counts. In other words:

# use counter::Counter;
let counter = "aaa".chars().collect::<Counter<_>>();
assert_eq!(counter[&'b'], 0);
// panics
// assert_eq!((*counter)[&'b'], 0);

This is a breaking change, causing a minor version bump, because it is not impossible that previous code depended on indexing panicing for unknown entries. Code which does not panic as part of its intended control flow will not be affected.