@@ -278,17 +278,22 @@ impl<B: MysqlShim<RW>, RW: Read + Write> MysqlIntermediary<B, RW> {
278278 io:: ErrorKind :: UnexpectedEof ,
279279 "client sent incomplete handshake" ,
280280 ) ,
281- nom:: Err :: Failure ( ( input, nom_e_kind) )
282- | nom:: Err :: Error ( ( input, nom_e_kind) ) => {
283- if let nom:: error:: ErrorKind :: Eof = nom_e_kind {
281+ nom:: Err :: Failure ( nom_error) | nom:: Err :: Error ( nom_error) => {
282+ if let nom:: error:: ErrorKind :: Eof = nom_error. code {
284283 io:: Error :: new (
285284 io:: ErrorKind :: UnexpectedEof ,
286- format ! ( "client did not complete handshake; got {:?}" , input) ,
285+ format ! (
286+ "client did not complete handshake; got {:?}" ,
287+ nom_error. input
288+ ) ,
287289 )
288290 } else {
289291 io:: Error :: new (
290292 io:: ErrorKind :: InvalidData ,
291- format ! ( "bad client handshake; got {:?} ({:?})" , input, nom_e_kind) ,
293+ format ! (
294+ "bad client handshake; got {:?} ({:?})" ,
295+ nom_error. input, nom_error. code
296+ ) ,
292297 )
293298 }
294299 }
@@ -329,19 +334,21 @@ impl<B: MysqlShim<RW>, RW: Read + Write> MysqlIntermediary<B, RW> {
329334 io:: ErrorKind :: UnexpectedEof ,
330335 "client sent incomplete handshake" ,
331336 ) ,
332- nom:: Err :: Failure ( ( input, nom_e_kind) )
333- | nom:: Err :: Error ( ( input, nom_e_kind) ) => {
334- if let nom:: error:: ErrorKind :: Eof = nom_e_kind {
337+ nom:: Err :: Failure ( nom_error) | nom:: Err :: Error ( nom_error) => {
338+ if let nom:: error:: ErrorKind :: Eof = nom_error. code {
335339 io:: Error :: new (
336340 io:: ErrorKind :: UnexpectedEof ,
337- format ! ( "client did not complete handshake; got {:?}" , input) ,
341+ format ! (
342+ "client did not complete handshake; got {:?}" ,
343+ nom_error. input
344+ ) ,
338345 )
339346 } else {
340347 io:: Error :: new (
341348 io:: ErrorKind :: InvalidData ,
342349 format ! (
343350 "bad client handshake; got {:?} ({:?})" ,
344- input, nom_e_kind
351+ nom_error . input, nom_error . code
345352 ) ,
346353 )
347354 }
0 commit comments