From 73d3d00ec437f87ac665b4e4da3bedec8ce4f9ef Mon Sep 17 00:00:00 2001 From: Kevin Ballard Date: Thu, 26 Sep 2013 17:21:59 -0700 Subject: 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. --- src/test/bench/core-std.rs | 4 ++-- src/test/bench/shootout-fasta.rs | 2 +- src/test/bench/shootout-k-nucleotide-pipes.rs | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/test/bench') diff --git a/src/test/bench/core-std.rs b/src/test/bench/core-std.rs index 5222c4f59b7..8a5cb016a73 100644 --- a/src/test/bench/core-std.rs +++ b/src/test/bench/core-std.rs @@ -73,8 +73,8 @@ fn read_line() { use std::rt::io::file::FileInfo; use std::rt::io::buffered::BufferedReader; - let path = Path(env!("CFG_SRC_DIR")) - .push_rel(&Path("src/test/bench/shootout-k-nucleotide.data")); + let path = Path::from_str(env!("CFG_SRC_DIR")) + .join_str("src/test/bench/shootout-k-nucleotide.data"); for _ in range(0, 3) { let mut reader = BufferedReader::new(path.open_reader(Open).unwrap()); diff --git a/src/test/bench/shootout-fasta.rs b/src/test/bench/shootout-fasta.rs index 53da752fdc4..addb43c4995 100644 --- a/src/test/bench/shootout-fasta.rs +++ b/src/test/bench/shootout-fasta.rs @@ -122,7 +122,7 @@ fn main() { }; let writer = if os::getenv("RUST_BENCH").is_some() { - io::file_writer(&Path("./shootout-fasta.data"), + io::file_writer(&Path::from_str("./shootout-fasta.data"), [io::Truncate, io::Create]).unwrap() } else { io::stdout() diff --git a/src/test/bench/shootout-k-nucleotide-pipes.rs b/src/test/bench/shootout-k-nucleotide-pipes.rs index 445b28b693c..58ec5d44071 100644 --- a/src/test/bench/shootout-k-nucleotide-pipes.rs +++ b/src/test/bench/shootout-k-nucleotide-pipes.rs @@ -164,8 +164,8 @@ fn main() { let rdr = if os::getenv("RUST_BENCH").is_some() { // FIXME: Using this compile-time env variable is a crummy way to // get to this massive data set, but include_bin! chokes on it (#2598) - let path = Path(env!("CFG_SRC_DIR")) - .push_rel(&Path("src/test/bench/shootout-k-nucleotide.data")); + let path = Path::from_str(env!("CFG_SRC_DIR")) + .join_str("src/test/bench/shootout-k-nucleotide.data"); ~path.open_reader(Open).unwrap() as ~Reader } else { ~stdio::stdin() as ~Reader -- cgit 1.4.1-3-g733a5