Skip to content

Commit

Permalink
Cleanup unused code in bitwarden crate
Browse files Browse the repository at this point in the history
  • Loading branch information
Hinton committed Oct 10, 2024
1 parent c2a4c85 commit ae414ea
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 22 deletions.
3 changes: 0 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions crates/bitwarden/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down
17 changes: 1 addition & 16 deletions crates/bitwarden/src/error.rs
Original file line number Diff line number Diff line change
@@ -1,28 +1,13 @@
//! Errors that can occur when using this SDK
use std::{borrow::Cow, fmt::Debug};
use std::fmt::Debug;

use thiserror::Error;

#[derive(Debug, Error)]
pub enum Error {
#[error(transparent)]
Core(#[from] bitwarden_core::Error),

#[error("Internal error: {0}")]
Internal(Cow<'static, str>),
}

impl From<String> 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
Expand Down

0 comments on commit ae414ea

Please sign in to comment.