Skip to content

Commit 658b7eb

Browse files
committed
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.
1 parent 8083908 commit 658b7eb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/libstd/sys/unix/os.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,8 @@ pub fn split_paths(unparsed: &OsStr) -> SplitPaths {
141141
fn is_colon(b: &u8) -> bool { *b == b':' }
142142
let unparsed = unparsed.as_bytes();
143143
SplitPaths {
144-
iter: unparsed.split(is_colon).map(bytes_to_path)
144+
iter: unparsed.split(is_colon as fn(&u8) -> bool)
145+
.map(bytes_to_path as fn(&'a [u8]) -> PathBuf)
145146
}
146147
}
147148

0 commit comments

Comments
 (0)