From 658b7eba5b9f226a9f537fa014f17aa4e76bcdf1 Mon Sep 17 00:00:00 2001 From: llogiq Date: Tue, 8 Sep 2015 07:41:50 +0200 Subject: Fixed required type coercion I'd have thought that the types of the slice::Split would have been inferred, but this appears not to be the case. Reverted this one change. --- src/libstd/sys/unix/os.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/libstd/sys') diff --git a/src/libstd/sys/unix/os.rs b/src/libstd/sys/unix/os.rs index 15f04d37674..e99e2c50d1d 100644 --- a/src/libstd/sys/unix/os.rs +++ b/src/libstd/sys/unix/os.rs @@ -141,7 +141,8 @@ pub fn split_paths(unparsed: &OsStr) -> SplitPaths { fn is_colon(b: &u8) -> bool { *b == b':' } let unparsed = unparsed.as_bytes(); SplitPaths { - iter: unparsed.split(is_colon).map(bytes_to_path) + iter: unparsed.split(is_colon as fn(&u8) -> bool) + .map(bytes_to_path as fn(&'a [u8]) -> PathBuf) } } -- cgit 1.4.1-3-g733a5