about summary refs log tree commit diff
path: root/src/libstd/rt/test.rs
diff options
context:
space:
mode:
authorKevin Ballard <kevin@sb.org>2013-09-26 17:21:59 -0700
committerKevin Ballard <kevin@sb.org>2013-10-15 21:56:54 -0700
commit73d3d00ec437f87ac665b4e4da3bedec8ce4f9ef (patch)
tree7050b2b93e3c58d7766e9aecd7e973ea88d9210e /src/libstd/rt/test.rs
parent6741241f4046aea4014b1a23618593fb481c8606 (diff)
downloadrust-73d3d00ec437f87ac665b4e4da3bedec8ce4f9ef.tar.gz
rust-73d3d00ec437f87ac665b4e4da3bedec8ce4f9ef.zip
path2: Replace the path module outright
Remove the old path.
Rename path2 to path.
Update all clients for the new path.

Also make some miscellaneous changes to the Path APIs to help the
adoption process.
Diffstat (limited to 'src/libstd/rt/test.rs')
-rw-r--r--src/libstd/rt/test.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/libstd/rt/test.rs b/src/libstd/rt/test.rs
index b6611eee9e6..1178bfdaa80 100644
--- a/src/libstd/rt/test.rs
+++ b/src/libstd/rt/test.rs
@@ -16,6 +16,7 @@ use container::Container;
 use iter::{Iterator, range};
 use super::io::net::ip::{SocketAddr, Ipv4Addr, Ipv6Addr};
 use vec::{OwnedVector, MutableVector, ImmutableVector};
+use path::GenericPath;
 use rt::sched::Scheduler;
 use unstable::{run_in_bare_thread};
 use rt::thread::Thread;
@@ -346,7 +347,6 @@ it is running in and assigns a port range based on it.
 fn base_port() -> uint {
     use os;
     use str::StrSlice;
-    use to_str::ToStr;
     use vec::ImmutableVector;
 
     let base = 9600u;
@@ -363,12 +363,14 @@ fn base_port() -> uint {
         ("dist", base + range * 8)
     ];
 
-    let path = os::getcwd().to_str();
+    // FIXME (#9639): This needs to handle non-utf8 paths
+    let path = os::getcwd();
+    let path_s = path.as_str().unwrap();
 
     let mut final_base = base;
 
     for &(dir, base) in bases.iter() {
-        if path.contains(dir) {
+        if path_s.contains(dir) {
             final_base = base;
             break;
         }