]> git.lizzy.rs Git - rust.git/commit
Use wrapper structs for `HashMap`'s iterators.
authorChase Southwood <chase.southwood@gmail.com>
Fri, 12 Dec 2014 07:02:19 +0000 (01:02 -0600)
committerChase Southwood <chase.southwood@gmail.com>
Tue, 16 Dec 2014 01:28:45 +0000 (19:28 -0600)
commit85fe141fb7c066e88a6872e74347c5f34d0223a7
tree39da1b2599e4ee0000a28aa7b26ce3b5964f6996
parenta81c3ab468ad7aebcab8a545b196e74c2fb3ac32
Use wrapper structs for `HashMap`'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 `HashMap` 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/libstd/collections/hash/map.rs
src/libstd/collections/hash/set.rs