File tree 1 file changed +2
-2
lines changed 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -88,7 +88,7 @@ pub mod index {
88
88
where
89
89
Find : for < ' a > FnMut ( & oid , & ' a mut Vec < u8 > ) -> Option < git_object:: BlobRef < ' a > > ,
90
90
{
91
- let dest = root. join ( git_features:: path:: from_byte_slice ( entry_path) . ok_or_else ( | | {
91
+ let dest = root. join ( git_features:: path:: from_byte_slice ( entry_path) . map_err ( |_ | {
92
92
index:: checkout:: Error :: IllformedUtf8 {
93
93
path : entry_path. to_owned ( ) ,
94
94
}
@@ -126,7 +126,7 @@ pub mod index {
126
126
path : root. to_path_buf ( ) ,
127
127
} ) ?;
128
128
let symlink_destination = git_features:: path:: from_byte_slice ( obj. data )
129
- . ok_or_else ( | | index:: checkout:: Error :: IllformedUtf8 { path : obj. data . into ( ) } ) ?;
129
+ . map_err ( |_ | index:: checkout:: Error :: IllformedUtf8 { path : obj. data . into ( ) } ) ?;
130
130
if symlinks {
131
131
#[ cfg( unix) ]
132
132
std:: os:: unix:: fs:: symlink ( symlink_destination, & dest) ?;
You can’t perform that action at this time.
0 commit comments