File tree Expand file tree Collapse file tree 3 files changed +7
-11
lines changed Expand file tree Collapse file tree 3 files changed +7
-11
lines changed Original file line number Diff line number Diff line change @@ -315,14 +315,10 @@ impl From<PacketCodecError> for IoError {
315315 fn from ( err : PacketCodecError ) -> Self {
316316 match err {
317317 PacketCodecError :: Io ( err) => err. into ( ) ,
318- PacketCodecError :: PacketTooLarge => {
319- io:: Error :: new ( io:: ErrorKind :: Other , "packet too large" ) . into ( )
320- }
321- PacketCodecError :: PacketsOutOfSync => {
322- io:: Error :: new ( io:: ErrorKind :: Other , "packet out of order" ) . into ( )
323- }
318+ PacketCodecError :: PacketTooLarge => io:: Error :: other ( "packet too large" ) . into ( ) ,
319+ PacketCodecError :: PacketsOutOfSync => io:: Error :: other ( "packet out of order" ) . into ( ) ,
324320 PacketCodecError :: BadCompressedPacketHeader => {
325- io:: Error :: new ( io :: ErrorKind :: Other , "bad compressed packet header" ) . into ( )
321+ io:: Error :: other ( "bad compressed packet header" ) . into ( )
326322 }
327323 }
328324 }
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ use std::{
2626 future:: Future ,
2727 io:: {
2828 self ,
29- ErrorKind :: { BrokenPipe , NotConnected , Other } ,
29+ ErrorKind :: { BrokenPipe , NotConnected } ,
3030 } ,
3131 mem:: replace,
3232 net:: SocketAddr ,
@@ -141,7 +141,7 @@ impl Future for CheckTcpStream<'_> {
141141 let mut buf = [ 0_u8 ; 1 ] ;
142142 match self . 0 . try_read ( & mut buf) {
143143 Ok ( 0 ) => Poll :: Ready ( Err ( io:: Error :: new ( BrokenPipe , "broken pipe" ) ) ) ,
144- Ok ( _) => Poll :: Ready ( Err ( io:: Error :: new ( Other , "stream should be empty" ) ) ) ,
144+ Ok ( _) => Poll :: Ready ( Err ( io:: Error :: other ( "stream should be empty" ) ) ) ,
145145 Err ( err) if err. kind ( ) == io:: ErrorKind :: WouldBlock => Poll :: Ready ( Ok ( ( ) ) ) ,
146146 Err ( err) => Poll :: Ready ( Err ( err) ) ,
147147 }
Original file line number Diff line number Diff line change @@ -100,8 +100,8 @@ where
100100 self . conn
101101 . get_pending_result ( )
102102 . map ( |pending_result| match pending_result {
103- Some ( PendingResult :: Pending ( meta) ) => meta. columns ( ) . len ( ) > 0 ,
104- Some ( PendingResult :: Taken ( meta) ) => meta. columns ( ) . len ( ) > 0 ,
103+ Some ( PendingResult :: Pending ( meta) ) => ! meta. columns ( ) . is_empty ( ) ,
104+ Some ( PendingResult :: Taken ( meta) ) => ! meta. columns ( ) . is_empty ( ) ,
105105 None => false ,
106106 } )
107107 . unwrap_or ( false )
You can’t perform that action at this time.
0 commit comments