File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed
src/tools/compiletest/src Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -2113,23 +2113,23 @@ actual:\n\
2113
2113
}
2114
2114
2115
2115
fn aggressive_rm_rf ( & self , path : & Path ) -> io:: Result < ( ) > {
2116
- for e in try! ( path. read_dir ( ) ) {
2117
- let entry = try! ( e ) ;
2116
+ for e in path. read_dir ( ) ? {
2117
+ let entry = e? ;
2118
2118
let path = entry. path ( ) ;
2119
- if try! ( entry. file_type ( ) ) . is_dir ( ) {
2120
- try! ( self . aggressive_rm_rf ( & path) ) ;
2119
+ if entry. file_type ( ) ? . is_dir ( ) {
2120
+ self . aggressive_rm_rf ( & path) ? ;
2121
2121
} else {
2122
2122
// Remove readonly files as well on windows (by default we can't)
2123
- try! ( fs:: remove_file ( & path) . or_else ( |e| {
2123
+ fs:: remove_file ( & path) . or_else ( |e| {
2124
2124
if cfg ! ( windows) && e. kind ( ) == io:: ErrorKind :: PermissionDenied {
2125
- let mut meta = try! ( entry. metadata ( ) ) . permissions ( ) ;
2125
+ let mut meta = entry. metadata ( ) ? . permissions ( ) ;
2126
2126
meta. set_readonly ( false ) ;
2127
- try! ( fs:: set_permissions ( & path, meta) ) ;
2127
+ fs:: set_permissions ( & path, meta) ? ;
2128
2128
fs:: remove_file ( & path)
2129
2129
} else {
2130
2130
Err ( e)
2131
2131
}
2132
- } ) )
2132
+ } ) ? ;
2133
2133
}
2134
2134
}
2135
2135
fs:: remove_dir ( path)
You can’t perform that action at this time.
0 commit comments