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/libstd/path | |
| 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/libstd/path')
| -rw-r--r-- | src/libstd/path/posix.rs | 2 | ||||
| -rw-r--r-- | src/libstd/path/windows.rs | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/libstd/path/posix.rs b/src/libstd/path/posix.rs index 6a0c8a93010..69f815e3f8b 100644 --- a/src/libstd/path/posix.rs +++ b/src/libstd/path/posix.rs @@ -31,7 +31,7 @@ pub type Components<'a> = Split<'a, u8, fn(&u8) -> bool>; /// Iterator that yields successive components of a Path as Option<&str> pub type StrComponents<'a> = - Map<&'a [u8], Option<&'a str>, Components<'a>, fn(&[u8]) -> Option<&str>>; + Map<Components<'a>, fn(&[u8]) -> Option<&str>>; /// Represents a POSIX file path #[derive(Clone)] diff --git a/src/libstd/path/windows.rs b/src/libstd/path/windows.rs index 7ddd919c11e..fcdebaf2cd3 100644 --- a/src/libstd/path/windows.rs +++ b/src/libstd/path/windows.rs @@ -38,11 +38,11 @@ use super::{contains_nul, BytesContainer, GenericPath, GenericPathUnsafe}; /// Each component is yielded as Option<&str> for compatibility with PosixPath, but /// every component in WindowsPath is guaranteed to be Some. pub type StrComponents<'a> = - Map<&'a str, Option<&'a str>, SplitTerminator<'a, char>, fn(&'a str) -> Option<&'a str>>; + Map<SplitTerminator<'a, char>, fn(&'a str) -> Option<&'a str>>; /// Iterator that yields successive components of a Path as &[u8] pub type Components<'a> = - Map<Option<&'a str>, &'a [u8], StrComponents<'a>, fn(Option<&str>) -> &[u8]>; + Map<StrComponents<'a>, fn(Option<&str>) -> &[u8]>; /// Represents a Windows path // Notes for Windows path impl: |
