We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a53597d commit 0d39f84Copy full SHA for 0d39f84
tests.rs
@@ -2,17 +2,19 @@
2
* License, v. 2.0. If a copy of the MPL was not distributed with this
3
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4
5
-use std::{io, str, run, task};
+use std::{str, run, task};
6
+use std::rt::io;
7
+use std::rt::io::Writer;
8
use extra::{tempfile, json};
9
use extra::json::ToJson;
10
11
use super::*;
12
13
14
fn write_whole_file(path: &Path, data: &str) {
- match io::file_writer(path, [io::Create]) {
- Ok(writer) => writer.write_str(data),
15
- Err(message) => fail!(message),
+ 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"),
18
}
19
20
0 commit comments