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

Bump to 2021 edition & inline formats #125

Merged
merged 1 commit into from
Aug 1, 2022
Merged

Bump to 2021 edition & inline formats #125

merged 1 commit into from
Aug 1, 2022

Conversation

nyurik
Copy link
Contributor

@nyurik nyurik commented Jun 7, 2022

  • Bump Rust edition 2018 -> 2021
  • Use new inline formatting, i.e. format!("{v}") instead of format!("{}", v) (simple cases only)

@djc
Copy link
Owner

djc commented Jun 7, 2022

Hey, thanks for this. This is a bit of a grab bag of changes. Are you gearing up for further contributions here, what's the angle?

Mostly it looks good. I think I'd like to stick with 2018 edition for now so we can keep a lower minimum supported Rust version for now. I don't think we test that explicitly in CI yet, maybe you could add that, and see what's the oldest version that currently works?

@nyurik
Copy link
Contributor Author

nyurik commented Jun 7, 2022

hi @djc , mostly this was the result of me looking through the code - I try to do minor things when i go over it, this way i feel i get a bit better understanding of it :)

The 2018 edition and the inline vars in the format str are connected -- the format was introduced in 1.58, after the 2021 edition (1.56), so these kinda have to go together.

If you think MSRV should be less than 1.56 (should be documented somewhere i guess), i could split this into two PRs

@djc
Copy link
Owner

djc commented Jun 7, 2022

Yes, we should stick to less than 1.56, would be nice if you can set that in CI and add a note to the README.

@nyurik nyurik mentioned this pull request Jun 7, 2022
@nyurik
Copy link
Contributor Author

nyurik commented Jun 7, 2022

I moved the simpler ones to a separate PR. CI changes are still a TODO

* Bump Rust edition 2018 -> 2021
* Use new inline formatting, i.e. `format!("{v}")` instead of `format!("{}", v)` (simple cases only)
* use more specific asserts like `assert_ne!`
* ignore intellij IDE files
* remove a few un-needed namespace prefixes
@nyurik nyurik changed the title Bump to 2021 edition, inline formats, lints Bump to 2021 edition & inline formats Jul 30, 2022
@djc
Copy link
Owner

djc commented Aug 1, 2022

Since we're on hashbrown 0.12 now which requires Rust 1.56 anyway, going to merge this. Thanks!

@djc djc merged commit 92306cb into djc:main Aug 1, 2022
@nyurik nyurik mentioned this pull request Aug 3, 2022
@nyurik nyurik deleted the bump2021 branch August 3, 2022 01:40
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