File tree 1 file changed +4
-7
lines changed
1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ use std::collections::HashSet;
15
15
use std:: ffi:: OsString ;
16
16
use std:: path:: { Path , PathBuf } ;
17
17
use std:: process:: Output ;
18
- use std:: { env , fs } ;
18
+ use std:: fs ;
19
19
20
20
use failure:: { Error , ResultExt } ;
21
21
use tempdir:: TempDir ;
@@ -32,9 +32,6 @@ mod settings {
32
32
pub const CHECK_JSON : & str = "RUSTFIX_TEST_CHECK_JSON" ;
33
33
pub const RECORD_JSON : & str = "RUSTFIX_TEST_RECORD_JSON" ;
34
34
pub const RECORD_FIXED_RUST : & str = "RUSTFIX_TEST_RECORD_FIXED_RUST" ;
35
-
36
- // set automatically
37
- pub const MODE : & str = "RUSTFIX_MODE" ;
38
35
}
39
36
40
37
fn compile ( file : & Path , mode : & str ) -> Result < Output , Error > {
@@ -125,15 +122,15 @@ fn diff(expected: &str, actual: &str) -> String {
125
122
write ! (
126
123
& mut res,
127
124
"differences found (+ == actual, - == expected):\n "
128
- ) ;
125
+ ) . unwrap ( ) ;
129
126
different = true ;
130
127
}
131
128
for diff in diff. lines ( ) {
132
- writeln ! ( & mut res, "{} {}" , prefix, diff) ;
129
+ writeln ! ( & mut res, "{} {}" , prefix, diff) . unwrap ( ) ;
133
130
}
134
131
}
135
132
if different {
136
- write ! ( & mut res, "" ) ;
133
+ write ! ( & mut res, "" ) . unwrap ( ) ;
137
134
}
138
135
139
136
res
You can’t perform that action at this time.
0 commit comments