File tree Expand file tree Collapse file tree 4 files changed +7
-7
lines changed Expand file tree Collapse file tree 4 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -316,13 +316,13 @@ impl From<PacketCodecError> for IoError {
316316 match err {
317317 PacketCodecError :: Io ( err) => err. into ( ) ,
318318 PacketCodecError :: PacketTooLarge => {
319- io:: Error :: new ( io :: ErrorKind :: Other , "packet too large" ) . into ( )
319+ io:: Error :: other ( "packet too large" ) . into ( )
320320 }
321321 PacketCodecError :: PacketsOutOfSync => {
322- io:: Error :: new ( io :: ErrorKind :: Other , "packet out of order" ) . into ( )
322+ io:: Error :: other ( "packet out of order" ) . into ( )
323323 }
324324 PacketCodecError :: BadCompressedPacketHeader => {
325- io:: Error :: new ( io :: ErrorKind :: Other , "bad compressed packet header" ) . into ( )
325+ io:: Error :: other ( "bad compressed packet header" ) . into ( )
326326 }
327327 }
328328 }
Original file line number Diff line number Diff line change @@ -149,7 +149,7 @@ pub enum PathOrBuf<'a> {
149149
150150impl < ' a > PathOrBuf < ' a > {
151151 /// Will either read data from disk or return the buffered data.
152- pub async fn read ( & self ) -> io:: Result < Cow < [ u8 ] > > {
152+ pub async fn read ( & self ) -> io:: Result < Cow < ' _ , [ u8 ] > > {
153153 match self {
154154 PathOrBuf :: Path ( x) => tokio:: fs:: read ( x. as_ref ( ) ) . await . map ( Cow :: Owned ) ,
155155 PathOrBuf :: Buf ( x) => Ok ( Cow :: Borrowed ( x. as_ref ( ) ) ) ,
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 )
Original file line number Diff line number Diff line change @@ -154,7 +154,7 @@ impl<'a> Transaction<'a> {
154154 }
155155
156156 if let Some ( isolation_level) = isolation_level {
157- let query = format ! ( "SET TRANSACTION ISOLATION LEVEL {}" , isolation_level ) ;
157+ let query = format ! ( "SET TRANSACTION ISOLATION LEVEL {isolation_level}" ) ;
158158 conn. as_mut ( ) . query_drop ( query) . await ?;
159159 }
160160
You can’t perform that action at this time.
0 commit comments