@@ -33,21 +33,21 @@ impl PgConnection {
33
33
( "TimeZone" , "UTC" ) ,
34
34
] ;
35
35
36
- if let Some ( ref extra_float_digits) = options. extra_float_digits {
36
+ if let Some ( extra_float_digits) = options. get_extra_float_digits ( ) {
37
37
params. push ( ( "extra_float_digits" , extra_float_digits) ) ;
38
38
}
39
39
40
- if let Some ( ref application_name) = options. application_name {
40
+ if let Some ( application_name) = options. get_application_name ( ) {
41
41
params. push ( ( "application_name" , application_name) ) ;
42
42
}
43
43
44
- if let Some ( ref options) = options. options {
44
+ if let Some ( options) = options. get_options ( ) {
45
45
params. push ( ( "options" , options) ) ;
46
46
}
47
47
48
48
stream. write ( Startup {
49
- username : Some ( & options. username ) ,
50
- database : options. database . as_deref ( ) ,
49
+ username : Some ( options. get_username ( ) ) ,
50
+ database : Some ( options. get_database ( ) ) ,
51
51
params : & params,
52
52
} ) ?;
53
53
@@ -77,7 +77,7 @@ impl PgConnection {
77
77
78
78
stream
79
79
. send ( Password :: Cleartext (
80
- options. password . as_deref ( ) . unwrap_or_default ( ) ,
80
+ options. get_password ( ) . unwrap_or_default ( ) ,
81
81
) )
82
82
. await ?;
83
83
}
@@ -90,8 +90,8 @@ impl PgConnection {
90
90
91
91
stream
92
92
. send ( Password :: Md5 {
93
- username : & options. username ,
94
- password : options. password . as_deref ( ) . unwrap_or_default ( ) ,
93
+ username : options. get_username ( ) ,
94
+ password : options. get_password ( ) . unwrap_or_default ( ) ,
95
95
salt : body. salt ,
96
96
} )
97
97
. await ?;
0 commit comments