Skip to content

Commit 0110f57

Browse files
committed
Update whoami to 2.1.1
1 parent 32326e5 commit 0110f57

3 files changed

Lines changed: 79 additions & 30 deletions

File tree

Cargo.lock

Lines changed: 75 additions & 28 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sqlx-core/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ smallvec = "1.7.0"
161161
url = { version = "2.2.2", default-features = false }
162162
uuid = { version = "1.0", default-features = false, optional = true, features = ["std"] }
163163
webpki-roots = { version = "1.0.0", optional = true }
164-
whoami = { version = "1.2.1", optional = true }
164+
whoami = { version = "2.1.1", optional = true }
165165
stringprep = "0.1.2"
166166
bstr = { version = "1.6.0", default-features = false, features = ["std"], optional = true }
167167
git2 = { version = "0.20.4", default-features = false, optional = true }

sqlx-core/src/postgres/options/mod.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,9 @@ impl PgConnectOptions {
137137

138138
let host = var("PGHOST").ok().unwrap_or_else(|| default_host(port));
139139

140-
let username = var("PGUSER").ok().unwrap_or_else(whoami::username);
140+
let username = var("PGUSER")
141+
.ok()
142+
.unwrap_or_else(|| whoami::username().unwrap_or_default());
141143

142144
let database = var("PGDATABASE").ok();
143145

0 commit comments

Comments
 (0)