From ae414ea30446c777c01fa431f08a384f50416ccc Mon Sep 17 00:00:00 2001 From: Hinton Date: Thu, 10 Oct 2024 09:45:32 +0200 Subject: [PATCH] Cleanup unused code in bitwarden crate --- Cargo.lock | 3 --- crates/bitwarden/Cargo.toml | 3 --- crates/bitwarden/src/error.rs | 17 +---------------- 3 files changed, 1 insertion(+), 22 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d720ced22..b30e3dbd5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -362,10 +362,7 @@ checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" name = "bitwarden" version = "1.0.0" dependencies = [ - "bitwarden-api-api", - "bitwarden-api-identity", "bitwarden-core", - "bitwarden-crypto", "bitwarden-generators", "bitwarden-sm", "thiserror", diff --git a/crates/bitwarden/Cargo.toml b/crates/bitwarden/Cargo.toml index ba1cdee19..3626f9d11 100644 --- a/crates/bitwarden/Cargo.toml +++ b/crates/bitwarden/Cargo.toml @@ -27,10 +27,7 @@ secrets = [ wasm = ["bitwarden-core/wasm"] # WASM support [dependencies] -bitwarden-api-api = { workspace = true } -bitwarden-api-identity = { workspace = true } bitwarden-core = { workspace = true } -bitwarden-crypto = { workspace = true } bitwarden-generators = { workspace = true, optional = true } bitwarden-sm = { workspace = true, optional = true } thiserror = { workspace = true } diff --git a/crates/bitwarden/src/error.rs b/crates/bitwarden/src/error.rs index 87251c4dc..163ccc208 100644 --- a/crates/bitwarden/src/error.rs +++ b/crates/bitwarden/src/error.rs @@ -1,6 +1,6 @@ //! Errors that can occur when using this SDK -use std::{borrow::Cow, fmt::Debug}; +use std::fmt::Debug; use thiserror::Error; @@ -8,21 +8,6 @@ use thiserror::Error; pub enum Error { #[error(transparent)] Core(#[from] bitwarden_core::Error), - - #[error("Internal error: {0}")] - Internal(Cow<'static, str>), -} - -impl From for Error { - fn from(s: String) -> Self { - Self::Internal(s.into()) - } -} - -impl From<&'static str> for Error { - fn from(s: &'static str) -> Self { - Self::Internal(s.into()) - } } // Ensure that the error messages implement Send and Sync