From 2d200c9c8bd6659720a68ab8dd74218b1e58c1e9 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Mon, 23 Feb 2015 10:59:17 -0800 Subject: std: Move std::env to the new I/O APIs This commit moves `std::env` away from the `std::old_io` error type as well as the `std::old_path` module. Methods returning an error now return `io::Error` and methods consuming or returning paths use `std::path` instead of `std::old_path`. This commit does not yet mark these APIs as `#[stable]`. This commit also migrates `std::old_io::TempDir` to `std::fs::TempDir` with essentially the exact same API. This type was added to interoperate with the new path API and has its own `tempdir` feature. Finally, this commit reverts the deprecation of `std::os` APIs returning the old path API types. This deprecation can come back once the entire `std::old_path` module is deprecated. [breaking-change] --- src/libstd/net/test.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/libstd/net') diff --git a/src/libstd/net/test.rs b/src/libstd/net/test.rs index c70e92884ac..aec50d638c6 100644 --- a/src/libstd/net/test.rs +++ b/src/libstd/net/test.rs @@ -34,6 +34,6 @@ fn base_port() -> u16 { let dirs = ["32-opt", "32-nopt", "64-opt", "64-nopt", "64-opt-vg", "all-opt", "snap3", "dist"]; dirs.iter().enumerate().find(|&(_, dir)| { - cwd.as_str().unwrap().contains(dir) + cwd.to_str().unwrap().contains(dir) }).map(|p| p.0).unwrap_or(0) as u16 * 1000 + 19600 } -- cgit 1.4.1-3-g733a5