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

Prepare for Rust 2024 edition beta on Windows and Linux #7620

Merged
merged 15 commits into from
Feb 12, 2025
Merged

Conversation

Serock3
Copy link
Contributor

@Serock3 Serock3 commented Feb 7, 2025

Currently compiles and passes all clippy lints on Linux and Windows. Android and macOS are left to do.

I followed the steps outlined in https://blog.rust-lang.org/2025/01/22/rust-2024-beta.html, then changed the edition back to 2021 and rust version back to 1.83.0.

iOS e2e test run https://github.com/mullvad/mullvadvpn-app/actions/runs/13281044105.

Fixes: DES-1510


This change is Reviewable

@Serock3 Serock3 requested a review from hulthe February 7, 2025 16:37
@Serock3 Serock3 self-assigned this Feb 7, 2025
Copy link

linear bot commented Feb 10, 2025

"client-legacy",
"http2",
"http1",
] }
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this stuff just auto-formatting, or part of the edition change?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

They suggested to run auto formatting as a part of the migration in this guide https://doc.rust-lang.org/nightly/edition-guide/editions/transitioning-an-existing-project-to-a-new-edition.html. Not actually sure if .toml files themselves are affected by cargo fmt, that may have been my editor. I still think we should sneak it into the PR while we're at it 😉

proxy::ApiConnectionMode,
rest::{self, MullvadRestHandle},
AccountsProxy, ApiEndpoint, DevicesProxy,
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this because of the edition change? :o

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is because of the beta formatting, probably not the edition itself.

@hulthe
Copy link
Contributor

hulthe commented Feb 10, 2025

Nicely done. Can't wait until we're able to merge this in a couple of weeks :D

@Serock3 Serock3 force-pushed the 2024-edition-beta branch 7 times, most recently from b4e9157 to d012102 Compare February 11, 2025 14:20
@Serock3 Serock3 marked this pull request as ready for review February 11, 2025 14:30
@Serock3 Serock3 changed the title Update to 2024 edition beta Prepare Rust 2024 edition beta for Windows and Linux Feb 11, 2025
@Serock3 Serock3 changed the title Prepare Rust 2024 edition beta for Windows and Linux Prepare for Rust 2024 edition beta on Windows and Linux Feb 11, 2025
@Serock3 Serock3 force-pushed the 2024-edition-beta branch 4 times, most recently from 4c3300a to 7d4399f Compare February 12, 2025 08:14
Copy link
Contributor

@MarkusPettersson98 MarkusPettersson98 left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 25 of 58 files at r1, 47 of 85 files at r2, 39 of 39 files at r3, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @hulthe)

Copy link

linear bot commented Feb 12, 2025

The 2024 edition contains new formatting rules.
All of these are not compatible with the 2021
formatting style, but most of them are.

To change the formatting to be as close to the
new style as possible while remaining compatible
with the 2021 edition, I first ran
`cargo +beta fmt` with the edition set to 2024,
then, with the edition set to 2021, I ran
`cargo fmt`.
@Serock3 Serock3 merged commit 218f495 into main Feb 12, 2025
54 of 55 checks passed
@Serock3 Serock3 deleted the 2024-edition-beta branch February 12, 2025 09:20
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.

3 participants