Skip to content

Commit 0dce15e

Browse files
committed
Feature-gate wasm-only imports
1 parent f986b43 commit 0dce15e

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

crates/bitwarden-vault/src/cipher/cipher_client.rs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,20 @@
1-
use bitwarden_core::{Client, OrganizationId, key_management::SymmetricKeyId};
2-
use bitwarden_crypto::{CompositeEncryptable, IdentifyKey, SymmetricCryptoKey};
1+
#[cfg(feature = "wasm")]
2+
use bitwarden_core::key_management::SymmetricKeyId;
3+
use bitwarden_core::{Client, OrganizationId};
4+
use bitwarden_crypto::IdentifyKey;
5+
#[cfg(feature = "wasm")]
6+
use bitwarden_crypto::{CompositeEncryptable, SymmetricCryptoKey};
37
#[cfg(feature = "wasm")]
48
use bitwarden_encoding::B64;
59
#[cfg(feature = "wasm")]
610
use wasm_bindgen::prelude::*;
711

812
use super::EncryptionContext;
13+
#[cfg(feature = "wasm")]
14+
use crate::Fido2CredentialFullView;
915
use crate::{
1016
Cipher, CipherError, CipherListView, CipherView, DecryptError, EncryptError,
11-
Fido2CredentialFullView, cipher::cipher::DecryptCipherListResult,
17+
cipher::cipher::DecryptCipherListResult,
1218
};
1319

1420
#[allow(missing_docs)]

crates/bitwarden-vault/src/collection_client.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ use bitwarden_collections::{
55
tree::{NodeItem, Tree},
66
};
77
use bitwarden_core::Client;
8+
#[cfg(feature = "wasm")]
89
use serde::{Deserialize, Serialize};
910
#[cfg(feature = "wasm")]
1011
use tsify::Tsify;

0 commit comments

Comments
 (0)