Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit4c4059a

Browse files
committed
Propagate changes fromtokio-postgres topostgres.
1 parent98814b8 commit4c4059a

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

‎postgres/src/config.rs‎

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ use tokio_postgres::{Error, Socket};
2929
///
3030
/// ## Keys
3131
///
32-
/// * `user` - The username to authenticate with.Required.
32+
/// * `user` - The username to authenticate with.Defaults to the user executing this process.
3333
/// * `password` - The password to authenticate with.
3434
/// * `dbname` - The name of the database to connect to. Defaults to the username.
3535
/// * `options` - Command line options used to configure the server.
@@ -143,15 +143,16 @@ impl Config {
143143

144144
/// Sets the user to authenticate with.
145145
///
146-
///Required.
146+
///If the user is not set, then this defaults to the user executing this process.
147147
pubfnuser(&mutself,user:&str) ->&mutConfig{
148148
self.config.user(user);
149149
self
150150
}
151151

152-
/// Gets the user to authenticate with, if one has been configured with
153-
/// the `user` method.
154-
pubfnget_user(&self) ->Option<&str>{
152+
/// Gets the user to authenticate with.
153+
/// If no user has been configured with the [`user`](Config::user) method,
154+
/// then this defaults to the user executing this process.
155+
pubfnget_user(&self) ->&str{
155156
self.config.get_user()
156157
}
157158

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp