@@ -323,11 +323,13 @@ impl<R: BufRead + ReadTimeout> ReadMessage for R {
323323 b'1' => ParseComplete ,
324324 b'2' => BindComplete ,
325325 b'3' => CloseComplete ,
326- b'A' => NotificationResponse {
327- pid : try!( rdr. read_u32 :: < BigEndian > ( ) ) ,
328- channel : try!( rdr. read_cstr ( ) ) ,
329- payload : try!( rdr. read_cstr ( ) ) ,
330- } ,
326+ b'A' => {
327+ NotificationResponse {
328+ pid : try!( rdr. read_u32 :: < BigEndian > ( ) ) ,
329+ channel : try!( rdr. read_cstr ( ) ) ,
330+ payload : try!( rdr. read_cstr ( ) ) ,
331+ }
332+ }
331333 b'c' => BCopyDone ,
332334 b'C' => CommandComplete { tag : try!( rdr. read_cstr ( ) ) } ,
333335 b'd' => {
@@ -360,23 +362,29 @@ impl<R: BufRead + ReadTimeout> ReadMessage for R {
360362 }
361363 }
362364 b'I' => EmptyQueryResponse ,
363- b'K' => BackendKeyData {
364- process_id : try!( rdr. read_u32 :: < BigEndian > ( ) ) ,
365- secret_key : try!( rdr. read_u32 :: < BigEndian > ( ) ) ,
366- } ,
365+ b'K' => {
366+ BackendKeyData {
367+ process_id : try!( rdr. read_u32 :: < BigEndian > ( ) ) ,
368+ secret_key : try!( rdr. read_u32 :: < BigEndian > ( ) ) ,
369+ }
370+ }
367371 b'n' => NoData ,
368372 b'N' => NoticeResponse { fields : try!( read_fields ( & mut rdr) ) } ,
369373 b'R' => try!( read_auth_message ( & mut rdr) ) ,
370374 b's' => PortalSuspended ,
371- b'S' => ParameterStatus {
372- parameter : try!( rdr. read_cstr ( ) ) ,
373- value : try!( rdr. read_cstr ( ) ) ,
374- } ,
375+ b'S' => {
376+ ParameterStatus {
377+ parameter : try!( rdr. read_cstr ( ) ) ,
378+ value : try!( rdr. read_cstr ( ) ) ,
379+ }
380+ }
375381 b't' => try!( read_parameter_description ( & mut rdr) ) ,
376382 b'T' => try!( read_row_description ( & mut rdr) ) ,
377383 b'Z' => ReadyForQuery { _state : try!( rdr. read_u8 ( ) ) } ,
378- t => return Err ( io:: Error :: new ( io:: ErrorKind :: Other ,
379- format ! ( "unexpected message tag `{}`" , t) ) ) ,
384+ t => {
385+ return Err ( io:: Error :: new ( io:: ErrorKind :: Other ,
386+ format ! ( "unexpected message tag `{}`" , t) ) )
387+ }
380388 } ;
381389 if rdr. limit ( ) != 0 {
382390 return Err ( io:: Error :: new ( io:: ErrorKind :: Other , "didn't read entire message" ) ) ;
@@ -431,8 +439,10 @@ fn read_auth_message<R: Read>(buf: &mut R) -> io::Result<BackendMessage> {
431439 6 => AuthenticationSCMCredential ,
432440 7 => AuthenticationGSS ,
433441 9 => AuthenticationSSPI ,
434- t => return Err ( io:: Error :: new ( io:: ErrorKind :: Other ,
435- format ! ( "unexpected authentication tag `{}`" , t) ) ) ,
442+ t => {
443+ return Err ( io:: Error :: new ( io:: ErrorKind :: Other ,
444+ format ! ( "unexpected authentication tag `{}`" , t) ) )
445+ }
436446 } )
437447}
438448
0 commit comments