Counter Rs Versions Save

Simple object to count Rust iterables

v0.4.1

5 years ago

This method simply converts the Counter into its internal HashMap, for times when the use of a Counter is an implementation detail.

v0.4.0

5 years ago

This is a breaking change which adds a second type parameter to Counter, which is used to actually store the count. Some existing code may fail due to the new required parameter. In particular, type discovery appears not to be able to correctly determine that N should be usize by default when creating a counter via init.

v0.3.0

6 years ago

Increment the minor version because this is another breaking change. We now simply return a Vec<(T, usize)> from the most_common* functions instead of an iterator over said vector.

v0.2.1

6 years ago
  • Implement AddAssign<I>, Add<I>, SubAssign<I>, Sub<I> for Counter where I: IntoIterator<Item=T>.
  • Implement AddAssign, SubAssign for Counter.
  • Improve documentation.

v0.2.0

6 years ago

Changed the interface: instead of needing to call .map on Counter objects, they now implement Deref and DerefMut, so all relevant methods can be called on them directly.

v0.1.0

7 years ago

Initial release. Some API features, notably the most_common* functions, have inefficient implementations; this will be addressed in future versions.