]> git.lizzy.rs Git - rust.git/commit
std: Remove `iter::ByRef` and generalize impls
authorAlex Crichton <alex@alexcrichton.com>
Tue, 3 Feb 2015 20:32:56 +0000 (12:32 -0800)
committerAlex Crichton <alex@alexcrichton.com>
Tue, 3 Feb 2015 20:41:23 +0000 (12:41 -0800)
commitd30f225b492163b14005d5069b7924f3fecf868c
tree11df52d8844878ce9db2f62238582a0dac2c2993
parent3b2ed14906fd9f9daa27cc7d1dad263d2f5ff450
std: Remove `iter::ByRef` and generalize impls

This removes the `ByRef` iterator adaptor to stay in line with the changes to
`std::io`. The `by_ref` method instead just returns `&mut Self`.

This also removes the implementation of `Iterator for &mut Iterator` and instead
generalizes it to `Iterator for &mut I` where `I: Iterator + ?Sized`. The
`Box<I>` implementations were also updated.

This is a breaking change due to the removal of the `std::iter::ByRef` type. All
mentions of `ByRef<'a, T>` should be replaced with `&mut T` to migrate forward.

[breaking-change]
src/liballoc/boxed.rs
src/libcore/iter.rs