Skip to content
This repository has been archived by the owner on Nov 30, 2022. It is now read-only.

Enable edition 2018 #136

Merged
merged 4 commits into from May 3, 2022
Merged

Conversation

tcharding
Copy link
Member

@tcharding tcharding commented Oct 27, 2021

Update the MSRV to Rustn 1.41.1 and enable edition 2018.

Should not be merged without rust-bitcoin organization-wide planning on how to go about this upgrade.

Discussion: rust-bitcoin/rust-bitcoin#510 (comment)

This one is a bit more involved than the same PRs for rust-bech32 or rust-bitcoinconcensus.

The commit message of patch 3:

Update to use edition 2018

Add `edition = "2018"` to the minifest file. In order to get the
codebase to build cleanly do:

- Remove usage of `use Hash as HashTrait`, instead use `impl crate::Hash for Hash` and `use Hash as _`.
- Same for HashEngine (remove EngineTrait).
- Add `crate::` to import statements and group same level (only did this for crate imports, the rest can wait for rustfmt :)
- Make test imports uniform, elect to _not_ use `super::*` because it seems cleaner, we are always importing the module we are testing and the same set of traits in each `test` module. Can change if requested.

Thanks

@tcharding
Copy link
Member Author

Now includes version bump to 0.11.0 (this means #148 could be merged before this one since it also requires a version bump).

@tcharding tcharding marked this pull request as ready for review April 21, 2022 02:24
@tcharding
Copy link
Member Author

Requires GitHub configuration change please @apoelstra to remove the Rust 1.29 CI job.

Copy link
Member

@apoelstra apoelstra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK ae03655

But needs rebase now.

Remove two instances of trailing whitespace character.
It seems we have consensus on bumping the MSRV to 1.41.1, update CI job
and the README to reflect this.
Add `edition = "2018"` to the minifest file. In order to get the
codebase to build cleanly do:

- Remove usage of `use Hash as HashTrait`, instead use
  `impl crate::Hash for Hash` and `use Hash as _`.
- Same for HashEngine (remove EngineTrait).
- Add `crate::` to import statements and group same level (only did this
  for crate imports, the rest can wait for rustfmt :)
- Make test imports uniform, elect to _not_ use `super::*` because it
  seems cleaner, we are always importing the module we are testing and
  the same set of traits in each `test` module. Can change if requested.
We just bumped the MSRV, this is a major change but since we are pre 1.0
we just have to bump the minor version number.

Bump version from current `0.10.0` to `0.11.0`.
@tcharding
Copy link
Member Author

No changes in force push, rebase only.

Copy link
Member

@apoelstra apoelstra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK abb7c80

@apoelstra apoelstra merged commit 9887c4e into rust-bitcoin:master May 3, 2022
@tcharding tcharding deleted the edition-2018 branch May 10, 2022 02:53
@apoelstra
Copy link
Member

Tagged and published the release. I don't know how this slipped between the cracks.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants