kudzu
kudzu copied to clipboard
Implement iterators for Map and Set
This adds:
-
Map::{iter, iter_mut, into_iter} -
Map::{keys, values, values_mut} -
Set::{difference, symmetric_difference, intersection, union}
We already have Set::{iter, into_iter}, and sets don't usually have iter_mut.
Fixes #1.
For full parity with std:
-
BTreeMap::{range, range_mut}andBTreeSet::rangecould be supported -
HashMap::drainandHashSet::drainmight work -- even thoughkudzudoesn't support removal, it may be possible with exclusive&mutaccess.- same for
retain, though that's not really an iterator, rather an iterating callback
- same for