1 unstable release
Uses old Rust 2015
0.1.0 | Jul 18, 2016 |
---|
#13 in #removing
3KB
dedup_by
A helper function for removing consecutive duplicates from a vector of complex types
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)]);