]> Untitled Git - bdk-cli/commitdiff
Merge bitcoindevkit/bdk-cli#140: bump stable rustc version to 1.65
authorSteve Myers <steve@notmandatory.org>
Tue, 14 Feb 2023 22:25:13 +0000 (16:25 -0600)
committerSteve Myers <steve@notmandatory.org>
Tue, 14 Feb 2023 22:26:27 +0000 (16:26 -0600)
e10366410303bc1aff7308e6a944dcb01e16e23a Derive Eq on enums and struts where possible (rajarshimaitra)
0f3aca208044eef829769722afabb0dd002e1a86 bump stable rustc version to 1.65 (rajarshimaitra)

Pull request description:

  <!-- You can erase any parts of this template not applicable to your Pull Request. -->

  ### Description

  As BDK bumped its stable to 1.65, it is safe for us to move it up also.

  ### Notes to the reviewers

  `1.65` cause clippy warning that `Eq` isn't derived while `PartialEq` is derived for the commands. We can't derive `Eq` for commands, as there is a `fee_rate` which is `f32` which isn't `Eq`, and this effect cascades to all structures. We also need `PartialEq` for the tests.

  A few options were:
   - allow the clippy warning conditionally for `1.65`, `1.57` doesn't have that lint. The way to do that is by creating custom features for different versions and making a build script that activates specific features for specific versions. Feature gate the clippy lint. or use https://github.com/dtolnay/rustversion which is an extra dep.

    - Remove `PartialEq` and create a method on `CliOpts` to translate it into `Vec<String>`, and then perform the tests.

    - Make `fee_rate` `u32` and derive `Eq` for all.

  I went for the last option as it seemed less complex, and not too bad(?). For bdk_cli as majorly a testing tool, it might not need floating point granularity and users can still test out with `u32` fee_rates. Internally it converts it back to `f32`.

  Suggestions welcome.

  ## Changelog notice

   - Bumped rustc `stable` to 1.65.

  ### Checklists

  #### All Submissions:

  * [x] I've signed all my commits
  * [x] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk-cli/blob/master/CONTRIBUTING.md)
  * [x] I ran `cargo fmt` and `cargo clippy` before committing

Top commit has no ACKs.

Tree-SHA512: d471d56dc6e50cc892a889bbe1f0283ce22feb9c34b6bdebfcfb71117069df166086d1e00c9a8e22979d2be24fad797335066d6c6a58a8ca5ec5f1d2b8d9575e


Trivial merge