File tree Expand file tree Collapse file tree 2 files changed +10
-7
lines changed Expand file tree Collapse file tree 2 files changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -395,10 +395,11 @@ impl Conn {
395
395
}
396
396
397
397
fn read_packet ( & mut self ) -> Result < Vec < u8 > > {
398
- let data = self . stream_mut ( ) . next ( ) . transpose ( ) ?. ok_or_else ( || io:: Error :: new (
399
- io:: ErrorKind :: BrokenPipe ,
400
- "server disconnected" ,
401
- ) ) ?;
398
+ let data = self
399
+ . stream_mut ( )
400
+ . next ( )
401
+ . transpose ( ) ?
402
+ . ok_or_else ( || io:: Error :: new ( io:: ErrorKind :: BrokenPipe , "server disconnected" ) ) ?;
402
403
match data[ 0 ] {
403
404
0xff => {
404
405
let error_packet = parse_err_packet ( & * data, self . 0 . capability_flags ) ?;
Original file line number Diff line number Diff line change @@ -466,9 +466,11 @@ impl OptsBuilder {
466
466
///
467
467
/// **Note:** IPv6 addresses must be given in square brackets, e.g. `[::1]`.
468
468
pub fn ip_or_hostname < T : Into < String > > ( mut self , ip_or_hostname : Option < T > ) -> Self {
469
- let new = ip_or_hostname. map ( Into :: into) . unwrap_or_else ( || "127.0.0.1" . into ( ) ) ;
470
- self . opts . 0 . ip_or_hostname = url:: Host :: parse ( & new)
471
- . unwrap_or_else ( |_| url:: Host :: Domain ( new. to_owned ( ) ) ) ;
469
+ let new = ip_or_hostname
470
+ . map ( Into :: into)
471
+ . unwrap_or_else ( || "127.0.0.1" . into ( ) ) ;
472
+ self . opts . 0 . ip_or_hostname =
473
+ url:: Host :: parse ( & new) . unwrap_or_else ( |_| url:: Host :: Domain ( new. to_owned ( ) ) ) ;
472
474
self
473
475
}
474
476
You can’t perform that action at this time.
0 commit comments