File tree Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -219,8 +219,6 @@ pub enum Error<E: std::error::Error + Send + Sync + 'static> {
219
219
Time ( #[ from] std:: time:: SystemTimeError ) ,
220
220
#[ error( "IO error while writing blob or reading file metadata or changing filetype" ) ]
221
221
Io ( #[ from] std:: io:: Error ) ,
222
- #[ error( transparent) ]
223
- FileClose ( #[ from] close_file:: CloseError ) ,
224
222
#[ error( "object {} for checkout at {} could not be retrieved from object database" , . oid. to_hex( ) , . path. display( ) ) ]
225
223
Find {
226
224
#[ source]
Original file line number Diff line number Diff line change 70
70
// NOTE: we don't call `file.sync_all()` here knowing that some filesystems don't handle this well.
71
71
// revisit this once there is a bug to fix.
72
72
update_fstat ( entry, file. metadata ( ) ?) ?;
73
- // file.close()?;
73
+ file. close ( ) . map_err ( |err| err . unwrap ( ) /* misnomer, won't panic */ ) ?;
74
74
obj. data . len ( )
75
75
}
76
76
git_index:: entry:: Mode :: SYMLINK => {
91
91
open_options ( p, destination_is_initially_empty, overwrite_existing) . open ( & dest)
92
92
} ) ?;
93
93
file. write_all ( obj. data ) ?;
94
- file. close ( ) ?;
94
+ file. close ( )
95
+ . map_err ( |err| err. unwrap ( ) /* misnomer for 'into inner' */ ) ?;
95
96
}
96
97
97
98
update_fstat ( entry, std:: fs:: symlink_metadata ( & dest) ?) ?;
You can’t perform that action at this time.
0 commit comments