Skip to content

Commit 0d39f84

Browse files
committed
Upgrade Rust
1 parent a53597d commit 0d39f84

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

tests.rs

+6-4
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,19 @@
22
* License, v. 2.0. If a copy of the MPL was not distributed with this
33
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
44

5-
use std::{io, str, run, task};
5+
use std::{str, run, task};
6+
use std::rt::io;
7+
use std::rt::io::Writer;
68
use extra::{tempfile, json};
79
use extra::json::ToJson;
810

911
use super::*;
1012

1113

1214
fn write_whole_file(path: &Path, data: &str) {
13-
match io::file_writer(path, [io::Create]) {
14-
Ok(writer) => writer.write_str(data),
15-
Err(message) => fail!(message),
15+
match io::file::open(path, io::Create, io::Write) {
16+
Some(mut writer) => writer.write(data.as_bytes()),
17+
None => fail!("could not open file"),
1618
}
1719
}
1820

0 commit comments

Comments
 (0)