From 08e889d1c1998c06e9f9bf388c3e2d93bea88bb9 Mon Sep 17 00:00:00 2001 From: Andreas Coroiu Date: Thu, 10 Oct 2024 09:33:41 +0200 Subject: [PATCH] lint: run cargo fmt --- crates/bitwarden-core/src/mobile/crypto.rs | 5 ++--- crates/bitwarden-crypto/src/keys/master_key.rs | 5 ++--- crates/bitwarden-vault/src/folder.rs | 5 ++--- crates/bitwarden-wasm-internal/src/lib.rs | 3 +-- 4 files changed, 7 insertions(+), 11 deletions(-) diff --git a/crates/bitwarden-core/src/mobile/crypto.rs b/crates/bitwarden-core/src/mobile/crypto.rs index 0f6122da95..1b027df439 100644 --- a/crates/bitwarden-core/src/mobile/crypto.rs +++ b/crates/bitwarden-core/src/mobile/crypto.rs @@ -6,6 +6,8 @@ use bitwarden_crypto::{ }; use schemars::JsonSchema; use serde::{Deserialize, Serialize}; +#[cfg(feature = "wasm")] +use {tsify_next::Tsify, wasm_bindgen::prelude::*}; use crate::{ client::{encryption_settings::EncryptionSettingsError, LoginMethod, UserLoginMethod}, @@ -13,9 +15,6 @@ use crate::{ Client, }; -#[cfg(feature = "wasm")] -use {tsify_next::Tsify, wasm_bindgen::prelude::*}; - #[derive(Serialize, Deserialize, Debug, JsonSchema)] #[serde(rename_all = "camelCase", deny_unknown_fields)] #[cfg_attr(feature = "uniffi", derive(uniffi::Record))] diff --git a/crates/bitwarden-crypto/src/keys/master_key.rs b/crates/bitwarden-crypto/src/keys/master_key.rs index 0602f45b74..f6c31ddd2b 100644 --- a/crates/bitwarden-crypto/src/keys/master_key.rs +++ b/crates/bitwarden-crypto/src/keys/master_key.rs @@ -5,13 +5,12 @@ use generic_array::{typenum::U32, GenericArray}; use rand::Rng; use schemars::JsonSchema; use serde::{Deserialize, Serialize}; +#[cfg(feature = "wasm")] +use {tsify_next::Tsify, wasm_bindgen::prelude::*}; use super::utils::{derive_kdf_key, stretch_kdf_key}; use crate::{util, CryptoError, EncString, KeyDecryptable, Result, SymmetricCryptoKey, UserKey}; -#[cfg(feature = "wasm")] -use {tsify_next::Tsify, wasm_bindgen::prelude::*}; - #[cfg(feature = "wasm")] #[wasm_bindgen::prelude::wasm_bindgen(typescript_custom_section)] const TS_CUSTOM_TYPES: &'static str = r#" diff --git a/crates/bitwarden-vault/src/folder.rs b/crates/bitwarden-vault/src/folder.rs index a1ef656016..f57b8ee154 100644 --- a/crates/bitwarden-vault/src/folder.rs +++ b/crates/bitwarden-vault/src/folder.rs @@ -7,12 +7,11 @@ use chrono::{DateTime, Utc}; use schemars::JsonSchema; use serde::{Deserialize, Serialize}; use uuid::Uuid; - -use crate::VaultParseError; - #[cfg(feature = "wasm")] use {tsify_next::Tsify, wasm_bindgen::prelude::*}; +use crate::VaultParseError; + #[derive(Serialize, Deserialize, Debug, JsonSchema)] #[serde(rename_all = "camelCase")] #[cfg_attr(feature = "uniffi", derive(uniffi::Record))] diff --git a/crates/bitwarden-wasm-internal/src/lib.rs b/crates/bitwarden-wasm-internal/src/lib.rs index e055b9373e..6367ff3170 100644 --- a/crates/bitwarden-wasm-internal/src/lib.rs +++ b/crates/bitwarden-wasm-internal/src/lib.rs @@ -6,5 +6,4 @@ mod vault; pub use client::BitwardenClient; pub use crypto::ClientCrypto; -pub use vault::folders::ClientFolders; -pub use vault::ClientVault; +pub use vault::{folders::ClientFolders, ClientVault};