Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions crates/bitcoind_rpc/src/bip158.rs
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,7 @@ impl core::fmt::Display for Error {
}
}

#[cfg(feature = "std")]
impl std::error::Error for Error {}
impl core::error::Error for Error {}

impl From<bitcoincore_rpc::Error> for Error {
fn from(e: bitcoincore_rpc::Error) -> Self {
Expand Down
3 changes: 1 addition & 2 deletions crates/chain/src/indexer/keychain_txout.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1022,8 +1022,7 @@ impl<K: core::fmt::Display> core::fmt::Display for InsertDescriptorError<K> {
}
}

#[cfg(feature = "std")]
impl<K: core::fmt::Display + core::fmt::Debug> std::error::Error for InsertDescriptorError<K> {}
impl<K: core::fmt::Display + core::fmt::Debug> core::error::Error for InsertDescriptorError<K> {}

/// `ChangeSet` represents persistent updates to a [`KeychainTxOutIndex`].
///
Expand Down
4 changes: 2 additions & 2 deletions crates/chain/src/indexer/spk_txout.rs
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ impl<I: Clone + Ord + core::fmt::Debug> SpkTxOutIndex<I> {
/// # use bitcoin::{Address, Network, Transaction};
/// # use std::str::FromStr;
/// #
/// # fn example() -> Result<(), Box<dyn std::error::Error>> {
/// # fn example() -> Result<(), Box<dyn core::error::Error>> {
/// let mut index = SpkTxOutIndex::<u32>::default();
///
/// // ... scan transactions to populate the index ...
Expand Down Expand Up @@ -382,7 +382,7 @@ impl<I: Clone + Ord + core::fmt::Debug> SpkTxOutIndex<I> {
/// # use bitcoin::{Address, Network, Transaction};
/// # use std::str::FromStr;
/// #
/// # fn example() -> Result<(), Box<dyn std::error::Error>> {
/// # fn example() -> Result<(), Box<dyn core::error::Error>> {
/// let mut index = SpkTxOutIndex::<u32>::default();
///
/// // ... scan transactions to populate the index ...
Expand Down
12 changes: 4 additions & 8 deletions crates/chain/src/local_chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -498,8 +498,7 @@ impl core::fmt::Display for MissingGenesisError {
}
}

#[cfg(feature = "std")]
impl std::error::Error for MissingGenesisError {}
impl core::error::Error for MissingGenesisError {}

/// Represents a failure when trying to insert/remove a checkpoint to/from [`LocalChain`].
#[derive(Clone, Debug, PartialEq)]
Expand Down Expand Up @@ -529,8 +528,7 @@ impl core::fmt::Display for AlterCheckPointError {
}
}

#[cfg(feature = "std")]
impl std::error::Error for AlterCheckPointError {}
impl core::error::Error for AlterCheckPointError {}

/// Occurs when an update does not have a common checkpoint with the original chain.
#[derive(Clone, Debug, PartialEq)]
Expand All @@ -549,8 +547,7 @@ impl core::fmt::Display for CannotConnectError {
}
}

#[cfg(feature = "std")]
impl std::error::Error for CannotConnectError {}
impl core::error::Error for CannotConnectError {}

/// The error type for [`LocalChain::apply_header_connected_to`].
#[derive(Debug, Clone, PartialEq)]
Expand All @@ -573,8 +570,7 @@ impl core::fmt::Display for ApplyHeaderError {
}
}

#[cfg(feature = "std")]
impl std::error::Error for ApplyHeaderError {}
impl core::error::Error for ApplyHeaderError {}

/// Applies `update_tip` onto `original_tip`.
///
Expand Down
4 changes: 2 additions & 2 deletions crates/chain/src/rusqlite_impl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -185,11 +185,11 @@ impl ToSql for Impl<bitcoin::Network> {
}
}

fn from_sql_error<E: std::error::Error + Send + Sync + 'static>(err: E) -> FromSqlError {
fn from_sql_error<E: core::error::Error + Send + Sync + 'static>(err: E) -> FromSqlError {
FromSqlError::Other(Box::new(err))
}

fn to_sql_error<E: std::error::Error + Send + Sync + 'static>(err: E) -> rusqlite::Error {
fn to_sql_error<E: core::error::Error + Send + Sync + 'static>(err: E) -> rusqlite::Error {
rusqlite::Error::ToSqlConversionFailure(Box::new(err))
}

Expand Down
3 changes: 1 addition & 2 deletions crates/chain/src/tx_graph.rs
Original file line number Diff line number Diff line change
Expand Up @@ -287,8 +287,7 @@ impl fmt::Display for CalculateFeeError {
}
}

#[cfg(feature = "std")]
impl std::error::Error for CalculateFeeError {}
impl core::error::Error for CalculateFeeError {}

impl<A> TxGraph<A> {
/// Iterate over all tx outputs known by [`TxGraph`].
Expand Down
2 changes: 1 addition & 1 deletion crates/file_store/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,4 @@ impl From<io::Error> for StoreError {
}
}

impl std::error::Error for StoreError {}
impl core::error::Error for StoreError {}
2 changes: 1 addition & 1 deletion crates/file_store/src/store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ impl<C> std::fmt::Display for StoreErrorWithDump<C> {
}
}

impl<C: fmt::Debug> std::error::Error for StoreErrorWithDump<C> {}
impl<C: fmt::Debug> core::error::Error for StoreErrorWithDump<C> {}

#[cfg(test)]
#[cfg_attr(coverage_nightly, coverage(off))]
Expand Down
2 changes: 1 addition & 1 deletion examples/example_cli/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ pub fn create_tx<O: ChainOracle>(
feerate: f32,
) -> anyhow::Result<(Psbt, Option<ChangeInfo>)>
where
O::Error: std::error::Error + Send + Sync + 'static,
O::Error: core::error::Error + Send + Sync + 'static,
{
let mut changeset = keychain_txout::ChangeSet::default();

Expand Down