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.
This commit is contained in:
parent
6741241f40
commit
73d3d00ec4
63 changed files with 2501 additions and 2989 deletions
|
|
@ -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());
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue