File tree Expand file tree Collapse file tree 1 file changed +4
-14
lines changed Expand file tree Collapse file tree 1 file changed +4
-14
lines changed Original file line number Diff line number Diff line change @@ -70,7 +70,10 @@ impl InnerConnection {
70
70
Either :: B ( s. read ( ) )
71
71
}
72
72
Some ( m) => Either :: A ( Ok ( ( m, s) ) . into_future ( ) ) ,
73
- None => Either :: A ( Err ( ( eof ( ) , s) ) . into_future ( ) ) ,
73
+ None => {
74
+ let err = io:: Error :: new ( io:: ErrorKind :: UnexpectedEof , "unexpected EOF" ) ;
75
+ Either :: A ( Err ( ( err, s) ) . into_future ( ) )
76
+ }
74
77
}
75
78
} )
76
79
. boxed ( )
@@ -348,21 +351,8 @@ fn connect_err(fields: &mut ErrorFields) -> ConnectError {
348
351
}
349
352
}
350
353
351
- fn err ( fields : & mut ErrorFields , conn : Connection ) -> Error {
352
- match DbError :: new ( fields) {
353
- Ok ( err) => Error :: Db ( Box :: new ( err) , conn) ,
354
- Err ( err) => Error :: Io ( err) ,
355
- }
356
- }
357
-
358
354
fn bad_message < T > ( ) -> T
359
355
where T : From < io:: Error >
360
356
{
361
357
io:: Error :: new ( io:: ErrorKind :: InvalidInput , "unexpected message" ) . into ( )
362
358
}
363
-
364
- fn eof < T > ( ) -> T
365
- where T : From < io:: Error >
366
- {
367
- io:: Error :: new ( io:: ErrorKind :: UnexpectedEof , "unexpected EOF" ) . into ( )
368
- }
You can’t perform that action at this time.
0 commit comments