File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
src/cargo/core/compiler/fingerprint Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -2017,16 +2017,16 @@ where
20172017 let Ok ( current_file_len) = fs:: metadata ( & path) . map ( |m| m. len ( ) ) else {
20182018 return Some ( StaleItem :: FailedToReadMetadata ( path. to_path_buf ( ) ) ) ;
20192019 } ;
2020- let Ok ( file) = File :: open ( path) else {
2021- return Some ( StaleItem :: MissingFile ( path. to_path_buf ( ) ) ) ;
2022- } ;
20232020 if current_file_len != file_len {
20242021 return Some ( StaleItem :: FileSizeChanged {
20252022 path : path. to_path_buf ( ) ,
20262023 new_size : current_file_len,
20272024 old_size : file_len,
20282025 } ) ;
20292026 }
2027+ let Ok ( file) = File :: open ( path) else {
2028+ return Some ( StaleItem :: MissingFile ( path. to_path_buf ( ) ) ) ;
2029+ } ;
20302030 let Ok ( checksum) = Checksum :: compute ( prior_checksum. algo , file) else {
20312031 return Some ( StaleItem :: UnableToReadFile ( path. to_path_buf ( ) ) ) ;
20322032 } ;
You can’t perform that action at this time.
0 commit comments