Skip to content

chore: Switch to latest rustfmt style edition #5255

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jplatte
Copy link
Collaborator

@jplatte jplatte commented Jun 19, 2025

Ahead of the main upgrade to Rust 2024, to avoid having to rebase that PR over and over again because it will likely take much longer to land than this.

edit:

To avoid churn due to rebases, people have requested that we wait for the following PRs before we merge this:

Signed-off-by: Jonas Platte [email protected]

@jplatte jplatte requested review from a team as code owners June 19, 2025 11:54
@jplatte jplatte requested review from poljar and removed request for a team June 19, 2025 11:54
Copy link

codecov bot commented Jun 19, 2025

Codecov Report

Attention: Patch coverage is 91.60671% with 35 lines in your changes missing coverage. Please review.

Project coverage is 90.13%. Comparing base (e7e9d5b) to head (ac1bc8d).
Report is 1 commits behind head on main.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
crates/matrix-sdk-common/src/linked_chunk/mod.rs 33.33% 4 Missing ⚠️
crates/matrix-sdk-base/src/latest_event.rs 0.00% 3 Missing ⚠️
...tes/matrix-sdk-base/src/store/integration_tests.rs 94.23% 0 Missing and 3 partials ⚠️
crates/matrix-sdk-crypto/src/identities/manager.rs 83.33% 2 Missing and 1 partial ⚠️
...rix-sdk-ui/src/timeline/controller/aggregations.rs 0.00% 2 Missing and 1 partial ⚠️
...rates/matrix-sdk-ui/src/timeline/controller/mod.rs 40.00% 3 Missing ⚠️
...dk-ui/src/timeline/controller/state_transaction.rs 25.00% 3 Missing ⚠️
crates/matrix-sdk-base/src/room/knock.rs 0.00% 2 Missing ⚠️
crates/matrix-sdk-crypto/src/types/device_keys.rs 50.00% 0 Missing and 2 partials ⚠️
...tes/matrix-sdk-crypto/src/verification/requests.rs 60.00% 2 Missing ⚠️
... and 6 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5255      +/-   ##
==========================================
- Coverage   90.13%   90.13%   -0.01%     
==========================================
  Files         334      334              
  Lines      104717   104808      +91     
  Branches   104717   104808      +91     
==========================================
+ Hits        94391    94470      +79     
- Misses       6272     6284      +12     
  Partials     4054     4054              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@poljar poljar left a comment

Choose a reason for hiding this comment

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

Looking through 477 files isn't fun, but I found a couple of regressions.

// lines after docs.
// lines after docs.
Copy link
Contributor

Choose a reason for hiding this comment

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

This one is questionable, probably should put everything on the same line.

Comment on lines +709 to 712
const SERIALIZED_B64: &str = "iaZwaWNrbGWEr2luaXRpYWxfcmF0Y2hldIKlaW5uZXLcAIABYMzfSnBRzMlPKF1uKjYbzLtkzNJ4RcylzN0HzP\
9DzON1Tm05zO7M2MzFQsy9Acz9zPnMqDvM4syQzNrMzxF5KzbM4sy9zPUbBWfM7m4/zJzM18zDzMESKgfMkE7M\
yszIHszqWjYyQURbzKTMkx7M58zANsy+AGPM2A8tbcyFYczge8ykzMFdbVxJMMyAzN8azJEXGsy8zPJazMMaP8\
ziDszmWwfM+My2ajLMr8y+eczTRm9TFadjb3VudGVyAKtzaWduaW5nX2tlecQgefpCr6Duu7QUWzKIeMOFmxv/\
Copy link
Contributor

Choose a reason for hiding this comment

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

This one also seems worse.

Comment on lines +302 to 305
const QR_CODE_DATA_BASE64: &str = "TUFUUklYAgS0yzZ1QVpQ1jlnoxWX3d5jrWRFfELxjS2gN7pz9y+3PABaaHR0\
cHM6Ly9zeW5hcHNlLW9pZGMubGFiLmVsZW1lbnQuZGV2L19zeW5hcHNlL2Ns\
aWVudC9yZW5kZXp2b3VzLzAxSFg5SzAwUTFINktQRDQ3RUc0RzFUM1hHACVo\
dHRwczovL3N5bmFwc2Utb2lkYy5sYWIuZWxlbWVudC5kZXYv";
Copy link
Contributor

Choose a reason for hiding this comment

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

Another such case.

@@ -111,7 +111,7 @@ where
{
fn from_response(response: MatrixDriverResponse) -> Option<Self> {
response.try_into().ok() // Delegates to the existing TryInto
// implementation
Copy link
Contributor

Choose a reason for hiding this comment

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

Another instance of this pattern.

@jplatte jplatte mentioned this pull request Jun 21, 2025
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.

2 participants