@@ -400,10 +400,11 @@ impl EnvConfig {
400400 . get ( DOCKER_YAML_PORTS )
401401 . and_then ( |ports_value| ports_value. as_sequence ( ) )
402402 && let Some ( port_mapping) = ports. first ( ) . and_then ( |port| port. as_str ( ) )
403- && let Some ( host_port) = port_mapping. split ( ':' ) . next ( )
404- && let Ok ( port) = host_port. parse ( ) {
405- config. set_mysql_port ( Some ( port) ) ;
406- }
403+ && let Some ( host_port) = port_mapping. split ( ':' ) . next ( )
404+ && let Ok ( port) = host_port. parse ( )
405+ {
406+ config. set_mysql_port ( Some ( port) ) ;
407+ }
407408 }
408409 if let Some ( postgresql) = yaml
409410 . get ( DOCKER_YAML_SERVICES )
@@ -436,10 +437,11 @@ impl EnvConfig {
436437 . get ( DOCKER_YAML_PORTS )
437438 . and_then ( |ports_value| ports_value. as_sequence ( ) )
438439 && let Some ( port_mapping) = ports. first ( ) . and_then ( |port| port. as_str ( ) )
439- && let Some ( host_port) = port_mapping. split ( ':' ) . next ( )
440- && let Ok ( port) = host_port. parse ( ) {
441- config. set_postgresql_port ( Some ( port) ) ;
442- }
440+ && let Some ( host_port) = port_mapping. split ( ':' ) . next ( )
441+ && let Ok ( port) = host_port. parse ( )
442+ {
443+ config. set_postgresql_port ( Some ( port) ) ;
444+ }
443445 }
444446 if let Some ( redis) = yaml
445447 . get ( DOCKER_YAML_SERVICES )
@@ -448,17 +450,19 @@ impl EnvConfig {
448450 if let Some ( command) = redis
449451 . get ( DOCKER_YAML_COMMAND )
450452 . and_then ( |command_value| command_value. as_str ( ) )
451- && let Some ( password_part) = command. split ( DOCKER_REDIS_PASSWORD_FLAG ) . nth ( 1 ) {
452- config. set_redis_password ( Some ( password_part. trim ( ) . to_string ( ) ) ) ;
453- }
453+ && let Some ( password_part) = command. split ( DOCKER_REDIS_PASSWORD_FLAG ) . nth ( 1 )
454+ {
455+ config. set_redis_password ( Some ( password_part. trim ( ) . to_string ( ) ) ) ;
456+ }
454457 if let Some ( ports) = redis
455458 . get ( DOCKER_YAML_PORTS )
456459 . and_then ( |ports_value| ports_value. as_sequence ( ) )
457460 && let Some ( port_mapping) = ports. first ( ) . and_then ( |port| port. as_str ( ) )
458- && let Some ( host_port) = port_mapping. split ( ':' ) . next ( )
459- && let Ok ( port) = host_port. parse ( ) {
460- config. set_redis_port ( Some ( port) ) ;
461- }
461+ && let Some ( host_port) = port_mapping. split ( ':' ) . next ( )
462+ && let Ok ( port) = host_port. parse ( )
463+ {
464+ config. set_redis_port ( Some ( port) ) ;
465+ }
462466 }
463467 Ok ( config)
464468 }
0 commit comments