File tree 2 files changed +3
-1
lines changed
gix/src/remote/connection/fetch
2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -45,6 +45,8 @@ pub enum Error {
45
45
RejectShallowRemote ,
46
46
#[ error( transparent) ]
47
47
NegotiationAlgorithmConfig ( #[ from] config:: key:: GenericErrorWithValue ) ,
48
+ #[ error( "Failed to read remaining bytes in stream" ) ]
49
+ ReadRemainingBytes ( #[ source] std:: io:: Error ) ,
48
50
}
49
51
50
52
impl gix_protocol:: transport:: IsSpuriousError for Error {
Original file line number Diff line number Diff line change @@ -287,7 +287,7 @@ where
287
287
#[ cfg( not( feature = "async-network-client" ) ) ]
288
288
let has_read_to_end = { rd. stopped_at ( ) . is_some ( ) } ;
289
289
if !has_read_to_end {
290
- std:: io:: copy ( & mut rd, & mut std:: io:: sink ( ) ) . unwrap ( ) ;
290
+ std:: io:: copy ( & mut rd, & mut std:: io:: sink ( ) ) . map_err ( Error :: ReadRemainingBytes ) ? ;
291
291
}
292
292
#[ cfg( feature = "async-network-client" ) ]
293
293
{
You can’t perform that action at this time.
0 commit comments