-
Notifications
You must be signed in to change notification settings - Fork 374
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
Conversation
"client-legacy", | ||
"http2", | ||
"http1", | ||
] } |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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 😉
mullvad-api/src/ffi/mod.rs
Outdated
proxy::ApiConnectionMode, | ||
rest::{self, MullvadRestHandle}, | ||
AccountsProxy, ApiEndpoint, DevicesProxy, |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
Nicely done. Can't wait until we're able to merge this in a couple of weeks :D |
b4e9157
to
d012102
Compare
4c3300a
to
7d4399f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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)
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`.
7d4399f
to
99b9393
Compare
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](https://camo.githubusercontent.com/1541c4039185914e83657d3683ec25920c672c6c5c7ab4240ee7bff601adec0b/68747470733a2f2f72657669657761626c652e696f2f7265766965775f627574746f6e2e737667)