]> git.lizzy.rs Git - rust.git/commit
Use wrapper structs for `BTreeMap`'s iterators.
authorChase Southwood <chase.southwood@gmail.com>
Fri, 12 Dec 2014 06:04:47 +0000 (00:04 -0600)
committerChase Southwood <chase.southwood@gmail.com>
Tue, 16 Dec 2014 01:26:28 +0000 (19:26 -0600)
commit765806ef1ee93b352b724aa76870d23d82894e4e
tree62f8cfd05a96017e0bfda339864811362f76e2cd
parent0669a432a2e09ad08886cb2138dbe9f5d681fb7f
Use wrapper structs for `BTreeMap`'s iterators.

Using a type alias for iterator implementations is fragile since this
exposes the implementation to users of the iterator, and any changes
could break existing code.

This commit changes the keys and values iterators of `BTreeMap` to use
proper new types, rather than type aliases.  However, since it is
fair-game to treat a type-alias as the aliased type, this is a:

[breaking-change].
src/libcollections/btree/map.rs