Make whoami optional, and only pull it in for postgres (#1571)

sqlx-core uses whoami to provide the fallback for postgres username. If
not building postgres support, omit the dependency on whoami.
This commit is contained in:
Josh Triplett 2021-12-20 17:54:58 -08:00 committed by GitHub
parent f2b3cc8dc3
commit 2e6ab7c3de
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -32,6 +32,7 @@ postgres = [
"futures-util/sink",
"json",
"dirs",
"whoami",
]
mysql = [
"sha-1",
@ -158,7 +159,7 @@ url = { version = "2.1.1", default-features = false }
uuid = { version = "0.8.1", default-features = false, optional = true, features = ["std"] }
webpki = { version = "0.21.0", optional = true }
webpki-roots = { version = "0.21.0", optional = true }
whoami = "1.0.1"
whoami = { version = "1.0.1", optional = true }
stringprep = "0.1.2"
bstr = { version = "0.2.14", default-features = false, features = ["std"], optional = true }
git2 = { version = "0.13.20", default-features = false, optional = true }