Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upgrade to rust 2021 edition #18

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

rursprung
Copy link

see the individual commit messages for details.
esp. the MSRV policy is just a suggestion - i can also drop that commit from this PR.

so far the crate used the default edition (2015).

upgrading to the newest edition before having the first major release
creates a stable platform on which to build in the future. the current
edition is also already two years old, so it is likely that most
consumers are already using a compatible rust version. for those which
might not have upgraded it remains an option to use an existing release
of the crate for the time being.

setting [`rust-version`] allows having cleaner error messages for those
using older rust compilers - though as of now this will not be
particularly helpful as the field is only supported starting with rust
1.56 which is also the version introducing support for the 2021 edition.
nevertheless, already specifying it now creates a base for future MSRV
updates.

note: all code changes were done by running `cargo fix --edition` as per
the [upgrade guide].

[upgrade guide]: https://doc.rust-lang.org/edition-guide/editions/transitioning-an-existing-project-to-a-new-edition.html
[`rust-version`]: https://doc.rust-lang.org/cargo/reference/manifest.html#the-rust-version-field
note that this is just a suggestion as a basis for discussion. some
crates are doing this (updating with new patch release), others are much
stricter.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant