diff --git a/.github/workflows/cont_integration.yml b/.github/workflows/cont_integration.yml index a73b344..93aae51 100644 --- a/.github/workflows/cont_integration.yml +++ b/.github/workflows/cont_integration.yml @@ -12,7 +12,7 @@ jobs: matrix: rust: - stable # STABLE - - 1.63.0 # MSRV + - 1.75.0 # MSRV steps: - name: Checkout uses: actions/checkout@v4 @@ -28,10 +28,6 @@ jobs: uses: dtolnay/rust-toolchain@stable with: toolchain: ${{ matrix.rust }} - - name: Pin dependencies for MSRV - if: matrix.rust == '1.63.0' - run: | - cargo update -p rustls --precise "0.23.19" - name: Test run: cargo test --verbose --all-features - name: Setup iptables for the timeout test @@ -61,12 +57,13 @@ jobs: run: cargo fmt --all -- --config format_code_in_doc_comments=true --check clippy_check: + name: Rust clippy runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@stable with: - toolchain: 1.78.0 + toolchain: 1.84.0 components: clippy - name: Rust Cache uses: Swatinem/rust-cache@v2.2.1 diff --git a/Cargo.toml b/Cargo.toml index e0fa581..b29ecf2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,7 +9,7 @@ documentation = "https://docs.rs/electrum-client/" description = "Bitcoin Electrum client library. Supports plaintext, TLS and Onion servers." keywords = ["bitcoin", "electrum"] readme = "README.md" -rust-version = "1.63.0" +rust-version = "1.75.0" edition = "2021" # loosely based on https://github.com/evgeniy-scherbina/rust-electrumx-client @@ -26,7 +26,7 @@ serde_json = { version = "^1.0" } # Optional dependencies openssl = { version = "0.10", optional = true } -rustls = { version = "0.23.19", optional = true, default-features = false } +rustls = { version = "0.23.21", optional = true, default-features = false } webpki-roots = { version = "0.25", optional = true } byteorder = { version = "1.0", optional = true } diff --git a/README.md b/README.md index 3a1c2bc..af483b9 100644 --- a/README.md +++ b/README.md @@ -5,18 +5,11 @@ [GitHub Workflow]: https://github.com/bitcoindevkit/rust-electrum-client/actions?query=workflow%3ACI [Latest Version]: https://img.shields.io/crates/v/electrum-client.svg [crates.io]: https://crates.io/crates/electrum-client -[MSRV Badge]: https://img.shields.io/badge/rustc-1.63.0%2B-lightgrey.svg -[Rust Blog]: https://blog.rust-lang.org/2022/08/11/Rust-1.63.0.html +[MSRV Badge]: https://img.shields.io/badge/rustc-1.75.0%2B-lightgrey.svg +[Rust Blog]: https://blog.rust-lang.org/2023/12/28/Rust-1.75.0.html Bitcoin Electrum client library. Supports plaintext, TLS and Onion servers. ## Minimum Supported Rust Version (MSRV) -This library should compile with any combination of features with Rust 1.63.0. - -To build with the MSRV you will need to pin dependencies as follows: - -```shell -cargo update -p rustls --precise "0.23.19" -``` - +This library should compile with any combination of features with Rust 1.75.0. diff --git a/clippy.toml b/clippy.toml index e3b9960..ac9f3cd 100644 --- a/clippy.toml +++ b/clippy.toml @@ -1 +1 @@ -msrv="1.63.0" \ No newline at end of file +msrv="1.75.0" \ No newline at end of file diff --git a/src/socks/mod.rs b/src/socks/mod.rs index 5aa29c0..2767b9d 100644 --- a/src/socks/mod.rs +++ b/src/socks/mod.rs @@ -99,7 +99,7 @@ impl ToTargetAddr for (Ipv6Addr, u16) { } } -impl<'a> ToTargetAddr for (&'a str, u16) { +impl ToTargetAddr for (&str, u16) { fn to_target_addr(&self) -> io::Result { // try to parse as an IP first if let Ok(addr) = self.0.parse::() { @@ -114,7 +114,7 @@ impl<'a> ToTargetAddr for (&'a str, u16) { } } -impl<'a> ToTargetAddr for &'a str { +impl ToTargetAddr for &str { fn to_target_addr(&self) -> io::Result { // try to parse as an IP first if let Ok(addr) = self.parse::() { diff --git a/src/socks/v4.rs b/src/socks/v4.rs index ed269b1..9d0fc3f 100644 --- a/src/socks/v4.rs +++ b/src/socks/v4.rs @@ -148,7 +148,7 @@ impl Read for Socks4Stream { } } -impl<'a> Read for &'a Socks4Stream { +impl Read for &Socks4Stream { fn read(&mut self, buf: &mut [u8]) -> io::Result { (&self.socket).read(buf) } @@ -164,7 +164,7 @@ impl Write for Socks4Stream { } } -impl<'a> Write for &'a Socks4Stream { +impl Write for &Socks4Stream { fn write(&mut self, buf: &[u8]) -> io::Result { (&self.socket).write(buf) } diff --git a/src/socks/v5.rs b/src/socks/v5.rs index de54747..7a602d2 100644 --- a/src/socks/v5.rs +++ b/src/socks/v5.rs @@ -135,7 +135,7 @@ enum Authentication<'a> { None, } -impl<'a> Authentication<'a> { +impl Authentication<'_> { fn id(&self) -> u8 { match *self { Authentication::Password { .. } => 2, @@ -329,7 +329,7 @@ impl Read for Socks5Stream { } } -impl<'a> Read for &'a Socks5Stream { +impl Read for &Socks5Stream { fn read(&mut self, buf: &mut [u8]) -> io::Result { (&self.socket).read(buf) } @@ -345,7 +345,7 @@ impl Write for Socks5Stream { } } -impl<'a> Write for &'a Socks5Stream { +impl Write for &Socks5Stream { fn write(&mut self, buf: &[u8]) -> io::Result { (&self.socket).write(buf) }