1+ use std:: path:: { Path , PathBuf } ;
2+
13use regex:: Regex ;
24use similar:: TextDiff ;
3- use std:: path:: { Path , PathBuf } ;
45
5- use crate :: fs as rfs;
66use build_helper:: drop_bomb:: DropBomb ;
77
8+ use crate :: fs;
9+
810#[ cfg( test) ]
911mod tests;
1012
@@ -43,7 +45,7 @@ impl Diff {
4345 /// Specify the expected output for the diff from a file.
4446 pub fn expected_file < P : AsRef < Path > > ( & mut self , path : P ) -> & mut Self {
4547 let path = path. as_ref ( ) ;
46- let content = rfs :: read_to_string ( path) ;
48+ let content = fs :: read_to_string ( path) ;
4749 let name = path. to_string_lossy ( ) . to_string ( ) ;
4850
4951 self . expected_file = Some ( path. into ( ) ) ;
@@ -62,7 +64,7 @@ impl Diff {
6264 /// Specify the actual output for the diff from a file.
6365 pub fn actual_file < P : AsRef < Path > > ( & mut self , path : P ) -> & mut Self {
6466 let path = path. as_ref ( ) ;
65- let content = rfs :: read_to_string ( path) ;
67+ let content = fs :: read_to_string ( path) ;
6668 let name = path. to_string_lossy ( ) . to_string ( ) ;
6769
6870 self . actual = Some ( content) ;
@@ -116,7 +118,7 @@ impl Diff {
116118 if let Some ( ref expected_file) = self . expected_file {
117119 if std:: env:: var ( "RUSTC_BLESS_TEST" ) . is_ok ( ) {
118120 println ! ( "Blessing `{}`" , expected_file. display( ) ) ;
119- rfs :: write ( expected_file, actual) ;
121+ fs :: write ( expected_file, actual) ;
120122 return ;
121123 }
122124 }
@@ -138,7 +140,7 @@ impl Diff {
138140 if let Some ( ref expected_file) = self . expected_file {
139141 if std:: env:: var ( "RUSTC_BLESS_TEST" ) . is_ok ( ) {
140142 println ! ( "Blessing `{}`" , expected_file. display( ) ) ;
141- rfs :: write ( expected_file, actual) ;
143+ fs :: write ( expected_file, actual) ;
142144 return ;
143145 }
144146 }
0 commit comments