vec-entries
Entry API for iterating over and removing elements from a Vec.
Description
Sometimes you want to do efficently remove and modify elements of a Vec in a slightly more
complex way than Vec::dedup_by, Vec::retain, or Vec::drain enable. This crate aims
to target a similar, but more expansive functionality.
Usage
Just import the extension trait and call the new method. The EntriesExt::entries enables
iterating across elements, mutating, removing, and re-inserting as needed. Like
Vec::dedup_by this is done by passing in a function which take an Entries object and
returns anything.
use EntriesExt;
let mut v = vec!;
let c = v.entries;
assert_eq!;
assert_eq!;
License
Licensed under
- MIT license (LICENSE or https://opensource.org/licenses/MIT)