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

Update to 2021 edition #65

Merged
merged 4 commits into from
Jun 1, 2022
Merged

Conversation

doehyunbaek
Copy link
Contributor

@doehyunbaek doehyunbaek commented May 26, 2022

I used 2021 edition cargo fix tool (cargo fix --edition) and there was no code change in the repo. Though I am pretty confident in Rust team's ability to make good refactoring tools, I went through changes in the edition guide and there seemed to be no problem.

One little thing I'm worried about is the message I got when I ran fix tool, which is also pasted in commit description, which is

When building the following dependencies, the given features will no longer be used:
  syn v1.0.95 (as host dependency) removed features: extra-traits, full, visit, visit-mut

The following differences only apply when building with dev-dependencies:
  standback v0.2.17 (as host dependency) removed features: std
  syn v1.0.95 (as host dependency) removed features: visit

would you mind taking a look at this?

As suggested in prometheus#64,
this commit update edition key of manifest file into 2021.

Before update, I ran 'cargo fix --edition' to check if migration is
needed as this guide(https://doc.rust-lang.org/edition-guide/rust-2021/prelude.html#migration)
says.
There was no change but following message was printed about the
upstream dependencies as mentioned in (https://doc.rust-lang.org/edition-guide/rust-2021/default-cargo-resolver.html#migration)
'When building the following dependencies, the given features will no longer be used:
  syn v1.0.95 (as host dependency) removed features: extra-traits, full, visit, visit-mut

The following differences only apply when building with dev-dependencies:
  standback v0.2.17 (as host dependency) removed features: std
  syn v1.0.95 (as host dependency) removed features: visit'

Signed-off-by: Doehyun Baek <doehyunbaek@gmail.com>
As documented in 2021 edition guide(https://doc.rust-lang.org/edition-guide/rust-2021/IntoIterator-for-arrays.html),
array.into_iter() now returns owned value instead of references,
This commit changes previous doc comments to utilize new behavior.

Signed-off-by: Doehyun Baek <doehyunbaek@gmail.com>
@doehyunbaek
Copy link
Contributor Author

doehyunbaek commented May 26, 2022

close #64

Copy link
Member

@mxinden mxinden left a comment

Choose a reason for hiding this comment

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

Thanks!

Just needs:

  • Version bump in Cargo.toml to v0.17.0.
  • Changelog entry in CHANGELOG.md.
  • Edition update to 2021 in derive-text-encode/Cargo.toml.
  • Version bump in derive-text-encode/Cargo.toml.
  • Update of prometheus-client-derive-text-encode in root level Cargo.toml to new version.

doehyunbaek added a commit to doehyunbaek/client_rust that referenced this pull request May 31, 2022
Accordiing to suggestions here(prometheus#65 (review)).
Accordiing to suggestions here(prometheus#65 (review)).

Signed-off-by: Doehyun Baek <doehyunbaek@gmail.com>
Signed-off-by: Doehyun Baek <doehyunbaek@gmail.com>
@doehyunbaek
Copy link
Contributor Author

Applied suggestion here1bca5bc.

Copy link
Member

@mxinden mxinden left a comment

Choose a reason for hiding this comment

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

🚀 perfect! Thanks for the help.

@mxinden mxinden merged commit 69e6674 into prometheus:master Jun 1, 2022
ackintosh pushed a commit to ackintosh/client_rust that referenced this pull request Aug 27, 2022
As suggested in prometheus#64,
this commit update edition key of manifest file into 2021.

As documented in 2021 edition guide(https://doc.rust-lang.org/edition-guide/rust-2021/IntoIterator-for-arrays.html),
array.into_iter() now returns owned value instead of references,
This commit changes previous doc comments to utilize new behavior.

Signed-off-by: Doehyun Baek <doehyunbaek@gmail.com>
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.

None yet

2 participants