From d22acb77b219f1abe7265ea3a6d88017523a2d7e Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Tue, 2 Dec 2014 14:28:35 -0500 Subject: libstd: fix fallout --- src/libstd/path/posix.rs | 4 ++-- src/libstd/path/windows.rs | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src/libstd/path') diff --git a/src/libstd/path/posix.rs b/src/libstd/path/posix.rs index 470e1b4dbb7..6cafedcad11 100644 --- a/src/libstd/path/posix.rs +++ b/src/libstd/path/posix.rs @@ -32,8 +32,8 @@ use super::{BytesContainer, GenericPath, GenericPathUnsafe}; pub type Components<'a> = Splits<'a, u8>; /// Iterator that yields successive components of a Path as Option<&str> -pub type StrComponents<'a> = Map<'a, &'a [u8], Option<&'a str>, - Components<'a>>; +pub type StrComponents<'a> = + Map<&'a [u8], Option<&'a str>, Components<'a>, fn(&[u8]) -> Option<&str>>; /// Represents a POSIX file path #[deriving(Clone)] diff --git a/src/libstd/path/windows.rs b/src/libstd/path/windows.rs index ea522536d22..c3242c9cead 100644 --- a/src/libstd/path/windows.rs +++ b/src/libstd/path/windows.rs @@ -38,12 +38,12 @@ 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, &'a str, Option<&'a str>, - CharSplits<'a, char>>; +pub type StrComponents<'a> = + Map<&'a str, Option<&'a str>, CharSplits<'a, char>, fn(&'a str) -> Option<&'a str>>; /// Iterator that yields successive components of a Path as &[u8] -pub type Components<'a> = Map<'a, Option<&'a str>, &'a [u8], - StrComponents<'a>>; +pub type Components<'a> = + Map, &'a [u8], StrComponents<'a>, fn(Option<&str>) -> &[u8]>; /// Represents a Windows path // Notes for Windows path impl: -- cgit 1.4.1-3-g733a5 From cc242bcf47f59e847436682def1e64ff481097e2 Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Thu, 4 Dec 2014 17:29:41 -0500 Subject: libstd: fix fallout --- src/libstd/path/windows.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/libstd/path') diff --git a/src/libstd/path/windows.rs b/src/libstd/path/windows.rs index c3242c9cead..e1b0d9b1395 100644 --- a/src/libstd/path/windows.rs +++ b/src/libstd/path/windows.rs @@ -1038,9 +1038,8 @@ fn parse_prefix<'a>(mut path: &'a str) -> Option { } return None; - fn parse_two_comps<'a>(mut path: &'a str, f: |char| -> bool) - -> Option<(uint, uint)> { - let idx_a = match path.find(|x| f(x)) { + fn parse_two_comps(mut path: &str, f: fn(char) -> bool) -> Option<(uint, uint)> { + let idx_a = match path.find(f) { None => return None, Some(x) => x }; -- cgit 1.4.1-3-g733a5 From 43cf7b4e457ad42aa44ad06469d6587ddb67eb2e Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Thu, 4 Dec 2014 23:50:57 -0500 Subject: libstd: fix fallout --- src/libstd/path/posix.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/libstd/path') diff --git a/src/libstd/path/posix.rs b/src/libstd/path/posix.rs index 6cafedcad11..3daba53cd86 100644 --- a/src/libstd/path/posix.rs +++ b/src/libstd/path/posix.rs @@ -29,7 +29,7 @@ use vec::Vec; use super::{BytesContainer, GenericPath, GenericPathUnsafe}; /// Iterator that yields successive components of a Path as &[u8] -pub type Components<'a> = Splits<'a, u8>; +pub type Components<'a> = Splits<'a, u8, fn(&u8) -> bool>; /// Iterator that yields successive components of a Path as Option<&str> pub type StrComponents<'a> = -- cgit 1.4.1-3-g733a5