Skip to content

Commit 4bb596a

Browse files
authored
Remove unused dependencies (#297)
Cleanup deps, and fix compilation issues with certain flag combinations using cargo hack.
1 parent 307801c commit 4bb596a

File tree

13 files changed

+30
-42
lines changed

13 files changed

+30
-42
lines changed

Cargo.lock

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

crates/bitwarden-core/src/auth/login/password.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,11 @@ use serde::{Deserialize, Serialize};
77

88
use crate::auth::{
99
api::response::IdentityTokenResponse,
10-
login::{
11-
response::{captcha_response::CaptchaResponse, two_factor::TwoFactorProviders},
12-
LoginError,
13-
},
10+
login::response::{captcha_response::CaptchaResponse, two_factor::TwoFactorProviders},
1411
};
1512
#[cfg(feature = "internal")]
1613
use crate::{
17-
auth::{api::request::PasswordTokenRequest, login::TwoFactorRequest},
14+
auth::{api::request::PasswordTokenRequest, login::LoginError, login::TwoFactorRequest},
1815
client::LoginMethod,
1916
Client,
2017
};

crates/bitwarden-core/src/client/encryption_settings.rs

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
1-
use bitwarden_crypto::{AsymmetricCryptoKey, KeyStore, SymmetricCryptoKey};
21
#[cfg(feature = "internal")]
3-
use bitwarden_crypto::{EncString, UnsignedSharedKey};
2+
use bitwarden_crypto::{AsymmetricCryptoKey, EncString, UnsignedSharedKey};
3+
#[cfg(any(feature = "internal", feature = "secrets"))]
4+
use bitwarden_crypto::{KeyStore, SymmetricCryptoKey};
45
use bitwarden_error::bitwarden_error;
56
use thiserror::Error;
7+
#[cfg(any(feature = "internal", feature = "secrets"))]
68
use uuid::Uuid;
79

8-
use crate::{
9-
error::UserIdAlreadySetError,
10-
key_management::{AsymmetricKeyId, KeyIds, SymmetricKeyId},
11-
MissingPrivateKeyError, VaultLockedError,
12-
};
10+
#[cfg(feature = "internal")]
11+
use crate::key_management::AsymmetricKeyId;
12+
#[cfg(any(feature = "internal", feature = "secrets"))]
13+
use crate::key_management::{KeyIds, SymmetricKeyId};
14+
use crate::{error::UserIdAlreadySetError, MissingPrivateKeyError, VaultLockedError};
1315

1416
#[bitwarden_error(flat)]
1517
#[derive(Debug, Error)]

crates/bitwarden-core/src/client/internal.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,11 @@ use uuid::Uuid;
1010

1111
#[cfg(feature = "secrets")]
1212
use super::login_method::ServiceAccountLoginMethod;
13+
#[cfg(any(feature = "internal", feature = "secrets"))]
14+
use crate::client::encryption_settings::EncryptionSettings;
1315
use crate::{
14-
auth::renew::renew_token,
15-
client::{encryption_settings::EncryptionSettings, login_method::LoginMethod},
16-
error::UserIdAlreadySetError,
17-
key_management::KeyIds,
18-
DeviceType,
16+
auth::renew::renew_token, client::login_method::LoginMethod, error::UserIdAlreadySetError,
17+
key_management::KeyIds, DeviceType,
1918
};
2019
#[cfg(feature = "internal")]
2120
use crate::{

crates/bitwarden-exporters/Cargo.toml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,11 @@ keywords.workspace = true
1717

1818
[features]
1919
uniffi = ["dep:uniffi", "bitwarden-core/uniffi"] # Uniffi bindings
20-
wasm = ["dep:tsify-next", "dep:wasm-bindgen"] # WebAssembly bindings
20+
wasm = [
21+
"bitwarden-vault/wasm",
22+
"dep:tsify-next",
23+
"dep:wasm-bindgen"
24+
] # WebAssembly bindings
2125

2226
[dependencies]
2327
base64 = ">=0.22.1, <0.23"
@@ -38,8 +42,5 @@ uniffi = { workspace = true, optional = true }
3842
uuid = { workspace = true }
3943
wasm-bindgen = { workspace = true, optional = true }
4044

41-
[dev-dependencies]
42-
rand = ">=0.8.5, <0.9"
43-
4445
[lints]
4546
workspace = true

crates/bitwarden-generators/Cargo.toml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,11 @@ keywords.workspace = true
1616

1717
[features]
1818
uniffi = ["dep:uniffi"] # Uniffi bindings
19-
wasm = ["dep:tsify-next", "dep:wasm-bindgen"]
19+
wasm = [
20+
"bitwarden-core/wasm",
21+
"dep:tsify-next",
22+
"dep:wasm-bindgen"
23+
] # WebAssembly bindings
2024

2125
[dependencies]
2226
bitwarden-core = { workspace = true, features = ["internal"] }

crates/bitwarden-send/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ serde_repr = { workspace = true }
3232
thiserror = { workspace = true }
3333
uniffi = { workspace = true, optional = true }
3434
uuid = { workspace = true }
35-
wasm-bindgen = { workspace = true, optional = true }
3635
zeroize = { version = ">=1.7.0, <2.0" }
3736

3837
[lints]

crates/bitwarden-threading/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ keywords.workspace = true
1313
bitwarden-error = { workspace = true }
1414
log = { workspace = true }
1515
serde = { workspace = true }
16-
serde_json = { workspace = true }
1716
thiserror = { workspace = true }
1817
tokio = { features = ["sync", "time", "rt"], workspace = true }
1918
tokio-util = { version = "0.7.15" }

crates/bitwarden-uniffi/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ bitwarden-vault = { workspace = true, features = ["uniffi"] }
3131
chrono = { workspace = true, features = ["std"] }
3232
env_logger = "0.11.1"
3333
log = { workspace = true }
34-
schemars = { workspace = true, optional = true }
3534
thiserror = { workspace = true }
3635
uniffi = { workspace = true }
3736
uuid = { workspace = true }

crates/bitwarden-uuid-macro/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ license-file.workspace = true
1515
keywords.workspace = true
1616

1717
[dependencies]
18-
proc-macro2 = { workspace = true }
1918
quote = { workspace = true }
2019
syn = { workspace = true }
2120

0 commit comments

Comments
 (0)