1
Fork 0

rollup merge of #21842: alexcrichton/issue-21839

Now that associated types are fully implemented the iterator adaptors only need
type parameters which are associated with actual storage. All other type
parameters can either be derived from these (e.g. they are an associated type)
or can be bare on the `impl` block itself.

This is a breaking change due to the removal of type parameters on these
iterator adaptors, but code can fairly easily migrate by just deleting the
relevant type parameters for each adaptor. Other behavior should not be
affected.

Closes #21839
[breaking-change]
This commit is contained in:
Alex Crichton 2015-02-02 11:01:16 -08:00
commit 99b2bd4bfa
12 changed files with 137 additions and 290 deletions

View file

@ -478,7 +478,7 @@ impl<'a> DoubleEndedIterator for CharIndices<'a> {
/// Created with `StrExt::bytes`
#[stable(feature = "rust1", since = "1.0.0")]
#[derive(Clone)]
pub struct Bytes<'a>(Map<&'a u8, u8, slice::Iter<'a, u8>, BytesDeref>);
pub struct Bytes<'a>(Map<slice::Iter<'a, u8>, BytesDeref>);
delegate_iter!{exact u8 : Bytes<'a>}
/// A temporary fn new type that ensures that the `Bytes` iterator
@ -526,7 +526,7 @@ pub struct Lines<'a> {
/// An iterator over the lines of a string, separated by either `\n` or (`\r\n`).
#[stable(feature = "rust1", since = "1.0.0")]
pub struct LinesAny<'a> {
inner: Map<&'a str, &'a str, Lines<'a>, fn(&str) -> &str>,
inner: Map<Lines<'a>, fn(&str) -> &str>,
}
impl<'a, Sep> CharSplits<'a, Sep> {