File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -70,7 +70,10 @@ impl InnerConnection {
7070 Either :: B ( s. read ( ) )
7171 }
7272 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+ }
7477 }
7578 } )
7679 . boxed ( )
@@ -348,21 +351,8 @@ fn connect_err(fields: &mut ErrorFields) -> ConnectError {
348351 }
349352}
350353
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-
358354fn bad_message < T > ( ) -> T
359355 where T : From < io:: Error >
360356{
361357 io:: Error :: new ( io:: ErrorKind :: InvalidInput , "unexpected message" ) . into ( )
362358}
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