@@ -101,10 +101,9 @@ fn is_file_skip(path: &Path) -> bool {
101101fn get_test_files ( path : & Path , recursive : bool ) -> Vec < PathBuf > {
102102 let mut files = vec ! [ ] ;
103103 if path. is_dir ( ) {
104- for entry in fs:: read_dir ( path) . unwrap_or_else ( |_| panic ! (
105- "couldn't read directory {}" ,
106- path. display( )
107- ) ) {
104+ for entry in fs:: read_dir ( path)
105+ . unwrap_or_else ( |_| panic ! ( "couldn't read directory {}" , path. display( ) ) )
106+ {
108107 let entry = entry. expect ( "couldn't get `DirEntry`" ) ;
109108 let path = entry. path ( ) ;
110109 if path. is_dir ( ) && recursive {
@@ -118,10 +117,9 @@ fn get_test_files(path: &Path, recursive: bool) -> Vec<PathBuf> {
118117}
119118
120119fn verify_config_used ( path : & Path , config_name : & str ) {
121- for entry in fs:: read_dir ( path) . unwrap_or_else ( |_| panic ! (
122- "couldn't read {} directory" ,
123- path. display( )
124- ) ) {
120+ for entry in
121+ fs:: read_dir ( path) . unwrap_or_else ( |_| panic ! ( "couldn't read {} directory" , path. display( ) ) )
122+ {
125123 let entry = entry. expect ( "couldn't get directory entry" ) ;
126124 let path = entry. path ( ) ;
127125 if path. extension ( ) . map_or ( false , |f| f == "rs" ) {
@@ -891,8 +889,7 @@ fn make_temp_file(file_name: &'static str) -> TempFile {
891889
892890 let mut file = File :: create ( & path) . expect ( "couldn't create temp file" ) ;
893891 let content = b"fn main() {}\n " ;
894- file. write_all ( content)
895- . expect ( "couldn't write temp file" ) ;
892+ file. write_all ( content) . expect ( "couldn't write temp file" ) ;
896893 TempFile { path }
897894}
898895
0 commit comments