Skip to content

Commit 1531ef7

Browse files
committed
Merge branch 'rust-upgrade' of https://github.com/kmcallister/rust-cssparser
2 parents f494977 + 0d39f84 commit 1531ef7

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

ast.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ pub enum ErrorReason {
121121

122122
impl ToStr for SyntaxError {
123123
fn to_str(&self) -> ~str {
124-
format!("{}:{} {:?}", self.location.line, self.location.column, self.reason)
124+
format!("{:u}:{:u} {:?}", self.location.line, self.location.column, self.reason)
125125
}
126126
}
127127

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)