diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2015-02-02 11:01:16 -0800 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2015-02-02 11:01:16 -0800 |
| commit | 99b2bd4bfa332c5a723114d09e8bb74d5a0c7376 (patch) | |
| tree | a9155fbcc06b7ee671247186089e5436a5f32d4b /src/libcore/str | |
| parent | 747e6b53e4b0e71b18c9941409b52144c514ac4e (diff) | |
| parent | 0e4448409ef61c703b98e4c5b2fd99447308942d (diff) | |
| download | rust-99b2bd4bfa332c5a723114d09e8bb74d5a0c7376.tar.gz rust-99b2bd4bfa332c5a723114d09e8bb74d5a0c7376.zip | |
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]
Diffstat (limited to 'src/libcore/str')
| -rw-r--r-- | src/libcore/str/mod.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libcore/str/mod.rs b/src/libcore/str/mod.rs index 026f708b305..8c0c16bafc4 100644 --- a/src/libcore/str/mod.rs +++ b/src/libcore/str/mod.rs @@ -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> { |
