Skip to content

Commit 84f4f60

Browse files
committed
chore: set rust edition to 2021
1 parent 746a0e6 commit 84f4f60

File tree

6 files changed

+15
-14
lines changed

6 files changed

+15
-14
lines changed

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ description = "Bitcoin Electrum client library. Supports plaintext, TLS and Onio
1010
keywords = ["bitcoin", "electrum"]
1111
readme = "README.md"
1212
rust-version = "1.63.0"
13+
edition = "2021"
1314

1415
# loosely based on https://github.com/evgeniy-scherbina/rust-electrumx-client
1516

src/api.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ use std::convert::TryInto;
66
use bitcoin::consensus::encode::{deserialize, serialize};
77
use bitcoin::{block, Script, Transaction, Txid};
88

9-
use batch::Batch;
10-
use types::*;
9+
use crate::batch::Batch;
10+
use crate::types::*;
1111

1212
/// API calls exposed by an Electrum client
1313
pub trait ElectrumApi {

src/batch.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
55
use bitcoin::{Script, Txid};
66

7-
use types::{Call, Param, ToElectrumScriptHash};
7+
use crate::types::{Call, Param, ToElectrumScriptHash};
88

99
/// Helper structure that caches all the requests before they are actually sent to the server.
1010
///

src/client.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ use log::{info, warn};
66

77
use bitcoin::{Script, Txid};
88

9-
use api::ElectrumApi;
10-
use batch::Batch;
11-
use config::Config;
12-
use raw_client::*;
9+
use crate::api::ElectrumApi;
10+
use crate::batch::Batch;
11+
use crate::config::Config;
12+
use crate::raw_client::*;
13+
use crate::types::*;
1314
use std::convert::TryFrom;
14-
use types::*;
1515

1616
/// Generalized Electrum client that supports multiple backends. This wraps
1717
/// [`RawClient`](client/struct.RawClient.html) and provides a more user-friendly

src/raw_client.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,11 @@ use rustls::{
3939
#[cfg(any(feature = "default", feature = "proxy"))]
4040
use crate::socks::{Socks5Stream, TargetAddr, ToTargetAddr};
4141

42-
use stream::ClonableStream;
42+
use crate::stream::ClonableStream;
4343

44-
use api::ElectrumApi;
45-
use batch::Batch;
46-
use types::*;
44+
use crate::api::ElectrumApi;
45+
use crate::batch::Batch;
46+
use crate::types::*;
4747

4848
macro_rules! impl_batch_call {
4949
( $self:expr, $data:expr, $call:ident ) => {{
@@ -298,7 +298,7 @@ impl RawClient<ElectrumSslStream> {
298298
not(feature = "use-openssl")
299299
))]
300300
mod danger {
301-
use raw_client::ServerName;
301+
use crate::raw_client::ServerName;
302302
use rustls::client::danger::ServerCertVerified;
303303
use rustls::pki_types::CertificateDer;
304304
use rustls::pki_types::UnixTime;

src/utils.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
//! Utilities helping to handle Electrum-related data.
22
3+
use crate::types::GetMerkleRes;
34
use bitcoin::hash_types::TxMerkleNode;
45
use bitcoin::hashes::sha256d::Hash as Sha256d;
56
use bitcoin::hashes::{Hash, HashEngine};
67
use bitcoin::Txid;
7-
use types::GetMerkleRes;
88

99
/// Verifies a Merkle inclusion proof as retrieved via [`transaction_get_merkle`] for a transaction with the
1010
/// given `txid` and `merkle_root` as included in the [`BlockHeader`].

0 commit comments

Comments
 (0)