From 64ec12e30c1ba78a779cb7e41cc0db71ea32e035 Mon Sep 17 00:00:00 2001 From: ghassmo Date: Wed, 22 Sep 2021 13:35:40 +0300 Subject: [PATCH] split btc from the default feature --- Cargo.toml | 2 +- src/error.rs | 6 +++--- src/service/mod.rs | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 1e7cde434..470420b7a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -101,7 +101,7 @@ version = "0.25.1" features = ["bundled", "sqlcipher"] [features] -default = ["bitcoin", "secp256k1", "electrum-client"] +btc = ["bitcoin", "secp256k1", "electrum-client"] sol = ["solana-sdk", "solana-client", "spl-token", "tokio-tungstenite"] [[bin]] diff --git a/src/error.rs b/src/error.rs index 954fe1559..2c06f96fd 100644 --- a/src/error.rs +++ b/src/error.rs @@ -43,7 +43,7 @@ pub enum Error { ZmqError(String), VerifyFailed, ClientFailed(String), - #[cfg(feature = "default")] + #[cfg(feature = "btc")] BtcFailed(String), #[cfg(feature = "sol")] SolFailed(String), @@ -100,7 +100,7 @@ impl fmt::Display for Error { Error::ZmqError(ref err) => write!(f, "ZmqError: {}", err), Error::VerifyFailed => f.write_str("Verify failed"), Error::ClientFailed(ref err) => write!(f, "Client failed: {}", err), - #[cfg(feature = "default")] + #[cfg(feature = "btc")] Error::BtcFailed(ref err) => write!(f, "Btc client failed: {}", err), #[cfg(feature = "sol")] Error::SolFailed(ref err) => write!(f, "Sol client failed: {}", err), @@ -233,7 +233,7 @@ impl From for Error { } } -#[cfg(feature = "default")] +#[cfg(feature = "btc")] impl From for Error { fn from(err: crate::service::BtcFailed) -> Error { Error::BtcFailed(err.to_string()) diff --git a/src/service/mod.rs b/src/service/mod.rs index 037fda9ba..464fc20af 100644 --- a/src/service/mod.rs +++ b/src/service/mod.rs @@ -3,9 +3,9 @@ pub mod gateway; pub mod reqrep; pub mod bridge; -#[cfg(feature = "default")] +#[cfg(feature = "btc")] pub mod btc; -#[cfg(feature = "default")] +#[cfg(feature = "btc")] pub use btc::{BitcoinKeys, PubAddress, BtcFailed, BtcResult}; #[cfg(feature = "sol")]