File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed
Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -121,7 +121,7 @@ pub enum ErrorReason {
121121
122122impl 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
Original file line number Diff line number Diff line change 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 ;
68use extra:: { tempfile, json} ;
79use extra:: json:: ToJson ;
810
911use super :: * ;
1012
1113
1214fn 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
You can’t perform that action at this time.
0 commit comments