Skip to content

Commit de74dc0

Browse files
committed
Merge #365: Enable edition 2018
c60bf1e Fix edition-idioms (Tobin C. Harding) 08bce7a Update to use edition 2018 (Tobin C. Harding) 2a83fa0 Update MSRV in CI and Readme from 1.29 to 1.41.1 (Tobin C. Harding) 2b73bb2 integration_test: Use latest bitcoin release (Tobin C. Harding) Pull request description: Update the MSRV to Rust 1.41.1 and enable edition 2018. I'm not sure how we want to merge these MSRV PRs across the stack but here is the `rust-miniscript` one. Discussion: rust-bitcoin/rust-bitcoin#510 (comment) ACKs for top commit: sanket1729: ACK c60bf1e. redid the entire process to match the diff. Tree-SHA512: 353cd793df4ba91b897e0dc58547b074ade7c23e7d75447c957ba947a12ff72c4504cb46036fdffea1591e429ee9eb056182dcffc89e301c72e3c5c433e8de16
2 parents 2468b35 + c60bf1e commit de74dc0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+222
-247
lines changed

.github/workflows/rust.yml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454
strategy:
5555
matrix:
5656
rust:
57-
- 1.29.0
57+
- 1.41.1
5858
- beta
5959
steps:
6060
- name: Checkout Crate
@@ -65,13 +65,6 @@ jobs:
6565
profile: minimal
6666
toolchain: ${{ matrix.rust }}
6767
override: true
68-
- name: Pin deps if rust 1.29
69-
if: matrix.rust == '1.29.0'
70-
run: |
71-
cargo generate-lockfile --verbose && \
72-
cargo update --verbose --package "cc" --precise "1.0.41" && \
73-
cargo update --verbose --package "serde" --precise "1.0.98" && \
74-
cargo update --verbose --package "serde_derive" --precise "1.0.98"
7568
- name: Running cargo
7669
run: ./contrib/test.sh
7770

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ repository = "https://github.com/rust-bitcoin/rust-miniscript/"
88
description = "Miniscript: a subset of Bitcoin Script designed for analysis"
99
keywords = [ "crypto", "bitcoin"]
1010
readme = "README.md"
11+
edition = "2018"
1112

1213
[features]
1314
compiler = []

README.md

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
![Build](https://github.com/rust-bitcoin/rust-miniscript/workflows/Continuous%20integration/badge.svg)
22

3-
**Minimum Supported Rust Version:** 1.29.0
4-
5-
*This crate uses "2015" edition and won't be ported over "2018" edition
6-
in the near future as this will change the MSRV to 1.31.*
3+
**Minimum Supported Rust Version:** 1.41.1
74

85
# Miniscript
96

@@ -36,22 +33,7 @@ or in [the `examples/` directory](https://github.com/apoelstra/rust-miniscript/t
3633

3734

3835
## Minimum Supported Rust Version (MSRV)
39-
This library should always compile with any combination of features on **Rust 1.29**.
40-
41-
Because some dependencies have broken the build in minor/patch releases, to compile with 1.29.0 you will need to
42-
generate the lockfile and run the following version-pinning command:
43-
```
44-
cargo generate-lockfile --verbose
45-
cargo update -p cc --precise "1.0.41" --verbose
46-
```
47-
48-
In order to use the `use-serde` feature or to build the unit tests with 1.29.0,
49-
the following version-pinning commands are also needed:
50-
```
51-
cargo update --package "serde" --precise "1.0.98"
52-
cargo update --package "serde_derive" --precise "1.0.98"
53-
```
54-
36+
This library should always compile with any combination of features on **Rust 1.41.1**.
5537

5638
## Contributing
5739
Contributions are generally welcome. If you intend to make larger changes please

examples/parse.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414

1515
//! Example: Parsing a descriptor from a string
1616
17-
extern crate bitcoin;
18-
extern crate miniscript;
17+
use bitcoin;
18+
use miniscript;
1919

2020
use miniscript::{descriptor::DescriptorType, Descriptor, DescriptorTrait};
2121
use std::str::FromStr;

examples/psbt.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
extern crate bitcoin;
2-
extern crate miniscript;
1+
use bitcoin;
32

43
use bitcoin::consensus::encode::deserialize;
54
use bitcoin::hashes::hex::FromHex;

examples/sign_multisig.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414

1515
//! Example: Signing a 2-of-3 multisignature
1616
17-
extern crate bitcoin;
18-
extern crate miniscript;
17+
use bitcoin;
18+
use miniscript;
1919

2020
use bitcoin::blockdata::witness::Witness;
2121
use bitcoin::secp256k1; // secp256k1 re-exported from rust-bitcoin

examples/verify_tx.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414

1515
//! Example: Verifying a signed transaction
1616
17-
extern crate bitcoin;
18-
extern crate miniscript;
17+
use bitcoin;
18+
use miniscript;
1919

2020
use bitcoin::consensus::Decodable;
2121
use bitcoin::util::sighash;

examples/xpub_descriptors.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@
1414

1515
//! Example: Parsing a xpub and getting address
1616
17-
extern crate miniscript;
18-
1917
use miniscript::bitcoin::{self, secp256k1};
2018
use miniscript::{Descriptor, DescriptorPublicKey, DescriptorTrait, TranslatePk2};
2119

integration_test/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ miniscript = {path = "../"}
88

99
# Until 0.26 support is released on rust-bitcoincore-rpc
1010
bitcoincore-rpc = {git = "https://github.com/sanket1729/rust-bitcoincore-rpc",rev = "1ee9a3e808815702ac1a4b974689fcb33b5648c3"}
11-
bitcoin = {ver = "0.28.0-rc.1", features = ["rand"]}
11+
bitcoin = { version = "0.28", features = ["rand"]}
1212
log = "0.4"
1313
rand = "0.8.4"

integration_test/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use bitcoincore_rpc::{Auth, Client, RpcApi};
1313
mod test_cpp;
1414
mod test_desc;
1515
mod test_util;
16-
use test_util::TestData;
16+
use crate::test_util::TestData;
1717

1818
struct StdLogger;
1919

0 commit comments

Comments
 (0)