diff options
| author | bors <bors@rust-lang.org> | 2014-12-29 18:02:30 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-12-29 18:02:30 +0000 |
| commit | 19f73b4ef6fb1d24f19738a8665889396fc1b0c8 (patch) | |
| tree | 14c38576695df0fd1ee49577481f509ce9d45086 /src/libstd/path | |
| parent | 3dcc409fac18a258ba2a8af4345d9566ec8eebad (diff) | |
| parent | c1f3acaa64a004577b79834996715595877efffc (diff) | |
auto merge of #20058 : Kimundi/rust/str_pattern_pre, r=alexcrichton
This stabilizes most methods on `&str` working with patterns in a way that is forwards-compatible with a generic string pattern matching API: - Methods that are using the primary name for their operation are marked as `#[stable]`, as they can be upgraded to a full `Pattern` API later without existing code breaking. Example: `contains(&str)` - Methods that are using a more specific name in order to not clash with the primary one are marked as `#[unstable]`, as they will likely be removed once their functionality is merged into the primary one. Example: `contains_char<C: CharEq>(C)` - The method docs got changed to consistently refer to the pattern types as a pattern. - Methods whose names do not match in the context of the more generic API got renamed. Example: `trim_chars -> trim_matches` Additionally, all methods returning iterators got changed to return unique new types with changed names in accordance with the new naming guidelines. See also https://github.com/rust-lang/rfcs/pull/528 Due to some deprecations and type changes, this is a [breaking-change]
Diffstat (limited to 'src/libstd/path')
| -rw-r--r-- | src/libstd/path/windows.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstd/path/windows.rs b/src/libstd/path/windows.rs index ea381bc0577..1d17ae987b2 100644 --- a/src/libstd/path/windows.rs +++ b/src/libstd/path/windows.rs @@ -26,7 +26,7 @@ use mem; use option::Option; use option::Option::{Some, None}; use slice::SliceExt; -use str::{CharSplits, FromStr, StrVector, StrExt}; +use str::{SplitTerminator, FromStr, StrVector, StrExt}; use string::{String, ToString}; use unicode::char::UnicodeChar; use vec::Vec; @@ -38,7 +38,7 @@ 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>, CharSplits<'a, char>, fn(&'a str) -> Option<&'a str>>; + Map<&'a str, Option<&'a str>, SplitTerminator<'a, char>, fn(&'a str) -> Option<&'a str>>; /// Iterator that yields successive components of a Path as &[u8] pub type Components<'a> = |
