dedup_by

Crates.iodedup_by
lib.rsdedup_by
version0.1.0
sourcesrc
created_at2016-07-18 23:01:45.473769
updated_at2016-07-18 23:01:45.473769
descriptionA helper function for removing consecutive duplicates from a vector of complex types
homepage
repositoryhttps://github.com/insanitybit/dedup_by
max_upload_size
id5711
size4,819
Colin (insanitybit)

documentation

README

dedup_by

A helper function for removing consecutive duplicates from a vector of complex types

Documentation

Example

use dedup_by::dedup_by;

let mut vec = vec![(1, 2), (2, 2), (3, 1)];
dedup_by(&mut vec, |a, b| { a.1 == b.1 });

assert_eq!(vec, [(1, 2), (3, 1)]);
Commit count: 10

cargo fmt