chore: set rust edition to 2021
This commit is contained in:
parent
746a0e6463
commit
84f4f609b9
@ -10,6 +10,7 @@ description = "Bitcoin Electrum client library. Supports plaintext, TLS and Onio
|
||||
keywords = ["bitcoin", "electrum"]
|
||||
readme = "README.md"
|
||||
rust-version = "1.63.0"
|
||||
edition = "2021"
|
||||
|
||||
# loosely based on https://github.com/evgeniy-scherbina/rust-electrumx-client
|
||||
|
||||
|
||||
@ -6,8 +6,8 @@ use std::convert::TryInto;
|
||||
use bitcoin::consensus::encode::{deserialize, serialize};
|
||||
use bitcoin::{block, Script, Transaction, Txid};
|
||||
|
||||
use batch::Batch;
|
||||
use types::*;
|
||||
use crate::batch::Batch;
|
||||
use crate::types::*;
|
||||
|
||||
/// API calls exposed by an Electrum client
|
||||
pub trait ElectrumApi {
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
|
||||
use bitcoin::{Script, Txid};
|
||||
|
||||
use types::{Call, Param, ToElectrumScriptHash};
|
||||
use crate::types::{Call, Param, ToElectrumScriptHash};
|
||||
|
||||
/// Helper structure that caches all the requests before they are actually sent to the server.
|
||||
///
|
||||
|
||||
@ -6,12 +6,12 @@ use log::{info, warn};
|
||||
|
||||
use bitcoin::{Script, Txid};
|
||||
|
||||
use api::ElectrumApi;
|
||||
use batch::Batch;
|
||||
use config::Config;
|
||||
use raw_client::*;
|
||||
use crate::api::ElectrumApi;
|
||||
use crate::batch::Batch;
|
||||
use crate::config::Config;
|
||||
use crate::raw_client::*;
|
||||
use crate::types::*;
|
||||
use std::convert::TryFrom;
|
||||
use types::*;
|
||||
|
||||
/// Generalized Electrum client that supports multiple backends. This wraps
|
||||
/// [`RawClient`](client/struct.RawClient.html) and provides a more user-friendly
|
||||
|
||||
@ -39,11 +39,11 @@ use rustls::{
|
||||
#[cfg(any(feature = "default", feature = "proxy"))]
|
||||
use crate::socks::{Socks5Stream, TargetAddr, ToTargetAddr};
|
||||
|
||||
use stream::ClonableStream;
|
||||
use crate::stream::ClonableStream;
|
||||
|
||||
use api::ElectrumApi;
|
||||
use batch::Batch;
|
||||
use types::*;
|
||||
use crate::api::ElectrumApi;
|
||||
use crate::batch::Batch;
|
||||
use crate::types::*;
|
||||
|
||||
macro_rules! impl_batch_call {
|
||||
( $self:expr, $data:expr, $call:ident ) => {{
|
||||
@ -298,7 +298,7 @@ impl RawClient<ElectrumSslStream> {
|
||||
not(feature = "use-openssl")
|
||||
))]
|
||||
mod danger {
|
||||
use raw_client::ServerName;
|
||||
use crate::raw_client::ServerName;
|
||||
use rustls::client::danger::ServerCertVerified;
|
||||
use rustls::pki_types::CertificateDer;
|
||||
use rustls::pki_types::UnixTime;
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
//! Utilities helping to handle Electrum-related data.
|
||||
|
||||
use crate::types::GetMerkleRes;
|
||||
use bitcoin::hash_types::TxMerkleNode;
|
||||
use bitcoin::hashes::sha256d::Hash as Sha256d;
|
||||
use bitcoin::hashes::{Hash, HashEngine};
|
||||
use bitcoin::Txid;
|
||||
use types::GetMerkleRes;
|
||||
|
||||
/// Verifies a Merkle inclusion proof as retrieved via [`transaction_get_merkle`] for a transaction with the
|
||||
/// given `txid` and `merkle_root` as included in the [`BlockHeader`].
|
||||
|
||||
Loading…
Reference in New Issue
Block a user