From 79a6d3dc9c6134d961e94cdd9a4354b9963f186e Mon Sep 17 00:00:00 2001 From: Anthony Dodd <2380740+thedodd@users.noreply.github.com> Date: Tue, 14 Feb 2023 14:06:06 -0600 Subject: [PATCH] Set whoami default-features to false (#2319) * Fixed typo. (#2156) * Set whoami default-features to false Otherwise, whoami pulls in web-sys, wasm-bindgen and a BUNCH of additional dependencies. This is really unnecessary, and if someone has an actual use case where they are attempting to connect to postgres from a browser, well ... they've probably already been pwned by now. If it is deemed necessary, then add an additional activation feature for that specific slew of deps. --------- Co-authored-by: Chris Foster --- Cargo.lock | 4 ---- sqlx-mysql/Cargo.toml | 2 +- sqlx-postgres/Cargo.toml | 2 +- 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 8c036d61ac..4250426d74 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3912,10 +3912,6 @@ name = "whoami" version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "45dbc71f0cdca27dc261a9bd37ddec174e4a0af2b900b890f378460f745426e3" -dependencies = [ - "wasm-bindgen", - "web-sys", -] [[package]] name = "winapi" diff --git a/sqlx-mysql/Cargo.toml b/sqlx-mysql/Cargo.toml index 7347839645..12765fa0bb 100644 --- a/sqlx-mysql/Cargo.toml +++ b/sqlx-mysql/Cargo.toml @@ -61,7 +61,7 @@ smallvec = "1.7.0" stringprep = "0.1.2" thiserror = "1.0.35" tracing = { version = "0.1.37", features = ["log"] } -whoami = "1.2.1" +whoami = { version = "1.2.1", default-features = false } serde = { version = "1.0.144", optional = true } diff --git a/sqlx-postgres/Cargo.toml b/sqlx-postgres/Cargo.toml index 9e6d083883..7919457e58 100644 --- a/sqlx-postgres/Cargo.toml +++ b/sqlx-postgres/Cargo.toml @@ -62,7 +62,7 @@ smallvec = "1.7.0" stringprep = "0.1.2" thiserror = "1.0.35" tracing = { version = "0.1.37", features = ["log"] } -whoami = "1.2.1" +whoami = { version = "1.2.1", default-features = false } serde = { version = "1.0.144", features = ["derive"] } serde_json = { version = "1.0.85", features = ["raw_value"] }