auto merge of #8069 : erickt/rust/maikklein, r=erickt

Good evening,

This is a superset of @MaikKlein's #7969 commit, that I've fixed up to compile. I had a couple commits I wanted to do on top of @MaikKlein's work that I didn't want to bitrot.
This commit is contained in:
bors 2013-07-28 00:19:21 -07:00
commit 20454da2db
15 changed files with 410 additions and 467 deletions

View file

@ -75,7 +75,7 @@ fn read_line() {
.push_rel(&Path("src/test/bench/shootout-k-nucleotide.data"));
for int::range(0, 3) |_i| {
let reader = result::unwrap(io::file_reader(&path));
let reader = io::file_reader(&path).unwrap();
while !reader.eof() {
reader.read_line();
}

View file

@ -124,8 +124,8 @@ fn main() {
};
let writer = if os::getenv("RUST_BENCH").is_some() {
result::unwrap(io::file_writer(&Path("./shootout-fasta.data"),
[io::Truncate, io::Create]))
io::file_writer(&Path("./shootout-fasta.data"),
[io::Truncate, io::Create]).unwrap()
} else {
io::stdout()
};

View file

@ -161,7 +161,7 @@ fn main() {
// 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"));
result::unwrap(io::file_reader(&path))
io::file_reader(&path).unwrap()
} else {
io::stdin()
};