Skip to content

Commit 805ea0a

Browse files
committed
Merge #159: ci(msrv): bump MSRV to 1.75 and rustls to 0.23.21
3dc4dac ci(clippy): bump to `1.84` (Leonardo Lima) 5a476fd deps(rustls): bump to `0.23.21` (Leonardo Lima) ec90685 ci(msrv): bump rust MSRV to `1.75` (Leonardo Lima) Pull request description: partially fixes bitcoindevkit/bdk#1750 It bumps the project MSRV to `1.75.0` in order to follow along with LDK changes, and to remove the pinned version of `rustls`, which now is under `1.71` MSRV, bumping it to latest `0.23.21`. It also updates the `clippy` step on CI to use rust `1.84`, fixing the found clippy issues. ACKs for top commit: tnull: > ACK [3dc4dac](3dc4dac) ValuedMammal: ACK 3dc4dac notmandatory: ACK 3dc4dac Tree-SHA512: 3b9c2feffc8cc32cb9751a36406e7f0d5ed4692afa1af186621bef93da924def3e23c5132e004deef955e40bd7c3242a2d07c33e3843b1b76b613be2f54afefe
2 parents 15f753f + 3dc4dac commit 805ea0a

File tree

7 files changed

+16
-26
lines changed

7 files changed

+16
-26
lines changed

.github/workflows/cont_integration.yml

+3-6
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
matrix:
1313
rust:
1414
- stable # STABLE
15-
- 1.63.0 # MSRV
15+
- 1.75.0 # MSRV
1616
steps:
1717
- name: Checkout
1818
uses: actions/checkout@v4
@@ -28,10 +28,6 @@ jobs:
2828
uses: dtolnay/rust-toolchain@stable
2929
with:
3030
toolchain: ${{ matrix.rust }}
31-
- name: Pin dependencies for MSRV
32-
if: matrix.rust == '1.63.0'
33-
run: |
34-
cargo update -p rustls --precise "0.23.19"
3531
- name: Test
3632
run: cargo test --verbose --all-features
3733
- name: Setup iptables for the timeout test
@@ -61,12 +57,13 @@ jobs:
6157
run: cargo fmt --all -- --config format_code_in_doc_comments=true --check
6258

6359
clippy_check:
60+
name: Rust clippy
6461
runs-on: ubuntu-latest
6562
steps:
6663
- uses: actions/checkout@v4
6764
- uses: dtolnay/rust-toolchain@stable
6865
with:
69-
toolchain: 1.78.0
66+
toolchain: 1.84.0
7067
components: clippy
7168
- name: Rust Cache
7269
uses: Swatinem/[email protected]

Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ documentation = "https://docs.rs/electrum-client/"
99
description = "Bitcoin Electrum client library. Supports plaintext, TLS and Onion servers."
1010
keywords = ["bitcoin", "electrum"]
1111
readme = "README.md"
12-
rust-version = "1.63.0"
12+
rust-version = "1.75.0"
1313
edition = "2021"
1414

1515
# loosely based on https://github.com/evgeniy-scherbina/rust-electrumx-client
@@ -26,7 +26,7 @@ serde_json = { version = "^1.0" }
2626

2727
# Optional dependencies
2828
openssl = { version = "0.10", optional = true }
29-
rustls = { version = "0.23.19", optional = true, default-features = false }
29+
rustls = { version = "0.23.21", optional = true, default-features = false }
3030
webpki-roots = { version = "0.25", optional = true }
3131

3232
byteorder = { version = "1.0", optional = true }

README.md

+3-10
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,11 @@
55
[GitHub Workflow]: https://github.com/bitcoindevkit/rust-electrum-client/actions?query=workflow%3ACI
66
[Latest Version]: https://img.shields.io/crates/v/electrum-client.svg
77
[crates.io]: https://crates.io/crates/electrum-client
8-
[MSRV Badge]: https://img.shields.io/badge/rustc-1.63.0%2B-lightgrey.svg
9-
[Rust Blog]: https://blog.rust-lang.org/2022/08/11/Rust-1.63.0.html
8+
[MSRV Badge]: https://img.shields.io/badge/rustc-1.75.0%2B-lightgrey.svg
9+
[Rust Blog]: https://blog.rust-lang.org/2023/12/28/Rust-1.75.0.html
1010

1111
Bitcoin Electrum client library. Supports plaintext, TLS and Onion servers.
1212

1313
## Minimum Supported Rust Version (MSRV)
1414

15-
This library should compile with any combination of features with Rust 1.63.0.
16-
17-
To build with the MSRV you will need to pin dependencies as follows:
18-
19-
```shell
20-
cargo update -p rustls --precise "0.23.19"
21-
```
22-
15+
This library should compile with any combination of features with Rust 1.75.0.

clippy.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
msrv="1.63.0"
1+
msrv="1.75.0"

src/socks/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ impl ToTargetAddr for (Ipv6Addr, u16) {
9999
}
100100
}
101101

102-
impl<'a> ToTargetAddr for (&'a str, u16) {
102+
impl ToTargetAddr for (&str, u16) {
103103
fn to_target_addr(&self) -> io::Result<TargetAddr> {
104104
// try to parse as an IP first
105105
if let Ok(addr) = self.0.parse::<Ipv4Addr>() {
@@ -114,7 +114,7 @@ impl<'a> ToTargetAddr for (&'a str, u16) {
114114
}
115115
}
116116

117-
impl<'a> ToTargetAddr for &'a str {
117+
impl ToTargetAddr for &str {
118118
fn to_target_addr(&self) -> io::Result<TargetAddr> {
119119
// try to parse as an IP first
120120
if let Ok(addr) = self.parse::<SocketAddrV4>() {

src/socks/v4.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ impl Read for Socks4Stream {
148148
}
149149
}
150150

151-
impl<'a> Read for &'a Socks4Stream {
151+
impl Read for &Socks4Stream {
152152
fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> {
153153
(&self.socket).read(buf)
154154
}
@@ -164,7 +164,7 @@ impl Write for Socks4Stream {
164164
}
165165
}
166166

167-
impl<'a> Write for &'a Socks4Stream {
167+
impl Write for &Socks4Stream {
168168
fn write(&mut self, buf: &[u8]) -> io::Result<usize> {
169169
(&self.socket).write(buf)
170170
}

src/socks/v5.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ enum Authentication<'a> {
135135
None,
136136
}
137137

138-
impl<'a> Authentication<'a> {
138+
impl Authentication<'_> {
139139
fn id(&self) -> u8 {
140140
match *self {
141141
Authentication::Password { .. } => 2,
@@ -329,7 +329,7 @@ impl Read for Socks5Stream {
329329
}
330330
}
331331

332-
impl<'a> Read for &'a Socks5Stream {
332+
impl Read for &Socks5Stream {
333333
fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> {
334334
(&self.socket).read(buf)
335335
}
@@ -345,7 +345,7 @@ impl Write for Socks5Stream {
345345
}
346346
}
347347

348-
impl<'a> Write for &'a Socks5Stream {
348+
impl Write for &Socks5Stream {
349349
fn write(&mut self, buf: &[u8]) -> io::Result<usize> {
350350
(&self.socket).write(buf)
351351
}

0 commit comments

Comments
 (0)