Skip to content

Commit 80aa109

Browse files
committed
chore: use core:: where applicable
1 parent 4c04e79 commit 80aa109

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

src/error.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,17 @@
22

33
//! Error types for the Bitcoin RPC client.
44
5+
use core::fmt;
6+
use core::num::TryFromIntError;
7+
use std::io;
8+
59
use bitcoin::{consensus::encode::FromHexError, hex::HexToArrayError};
610
#[cfg(feature = "28_0")]
711
use corepc_types::v17::{GetBlockHeaderVerboseError, GetBlockVerboseOneError};
812
#[cfg(not(feature = "28_0"))]
913
use corepc_types::v30::{GetBlockHeaderVerboseError, GetBlockVerboseOneError};
1014
use corepc_types::{bitcoin, v30::GetBlockFilterError};
1115
use jsonrpc::serde_json;
12-
use std::{fmt, io, num::TryFromIntError};
1316

1417
/// Result type alias for the RPC client.
1518
pub type Result<T> = std::result::Result<T, Error>;
@@ -69,7 +72,7 @@ impl fmt::Display for Error {
6972
}
7073
}
7174

72-
impl std::error::Error for Error {}
75+
impl core::error::Error for Error {}
7376

7477
// Conversions from other error types
7578
impl From<jsonrpc::Error> for Error {

tests/rpc_client.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@
44
//!
55
//! These tests require a running Bitcoin Core node in regtest mode. To setup, refer to [`corepc_node`].
66
7+
use core::str::FromStr;
8+
79
use bdk_bitcoind_client::{Auth, Client, Error};
810
use corepc_types::bitcoin::{Amount, BlockHash, Txid};
9-
use std::str::FromStr;
1011

1112
mod testenv;
1213

0 commit comments

Comments
 (0)