Skip to content

Upgrade matrix-sdk-ui to Rust edition 2024 #5309

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

Merged
merged 2 commits into from
Jul 14, 2025
Merged

Conversation

jplatte
Copy link
Collaborator

@jplatte jplatte commented Jun 29, 2025

I made sure that the two remaining PRs that blocked the large rustfmt PR (#5225, #5258) do not touch the UI crate, so this is not going to result in conflicts there.

There were a few more + use<_> clauses added in private interfaces, but they weren't necessary for compilation to succeed, so I omitted them. I doubt they will become required for anything later, but if they do, it's gonna be the same sort of situation as newly-added -> impl Trait return types, where surely nobody thinks to add + use<>, and the compiler is hopefully going to suggest doing that where helpful.

Signed-off-by: Jonas Platte

Copy link

codecov bot commented Jun 29, 2025

Codecov Report

Attention: Patch coverage is 82.60870% with 4 lines in your changes missing coverage. Please review.

Project coverage is 88.78%. Comparing base (6de4032) to head (caa71fa).
Report is 26 commits behind head on main.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...rates/matrix-sdk-ui/src/encryption_sync_service.rs 0.00% 0 Missing and 1 partial ⚠️
...list_service/filters/normalized_match_room_name.rs 0.00% 1 Missing ⚠️
...rix-sdk-ui/src/timeline/controller/aggregations.rs 0.00% 0 Missing and 1 partial ⚠️
crates/matrix-sdk-ui/src/timeline/date_dividers.rs 0.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5309   +/-   ##
=======================================
  Coverage   88.77%   88.78%           
=======================================
  Files         334      334           
  Lines       91317    91312    -5     
  Branches    91317    91312    -5     
=======================================
  Hits        81069    81069           
+ Misses       6417     6409    -8     
- Partials     3831     3834    +3     

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

@jplatte jplatte marked this pull request as ready for review June 29, 2025 21:00
@jplatte jplatte requested a review from a team as a code owner June 29, 2025 21:00
@jplatte jplatte requested review from stefanceriu and removed request for a team June 29, 2025 21:00
Copy link
Member

@stefanceriu stefanceriu left a comment

Choose a reason for hiding this comment

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

Apart from what I commented this looks good to me, thank you Jonas!

I don't think I should be the only one reviewing it though so I'll let the review gods reassign.

edition = "2021"
edition = "2024"
Copy link
Member

Choose a reason for hiding this comment

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

🥳

} else {
false
}
if let Some(edit) = best_edit { edit_item(event, edit) } else { false }
Copy link
Member

Choose a reason for hiding this comment

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

Ending a function in if let feels super strange to me, I think I liked the previous version better.

Copy link
Member

Choose a reason for hiding this comment

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

It's the same, but formatted differently, right?

Copy link
Member

Choose a reason for hiding this comment

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

Yep, just one lined.

Comment on lines +147 to +148
assert!(
event
Copy link
Member

Choose a reason for hiding this comment

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

Got mixed feelings about this one too.

@stefanceriu stefanceriu requested review from a team and Hywan and removed request for a team June 30, 2025 05:38
jplatte added 2 commits July 13, 2025 12:18
Automated with `cargo fix --edition -p matrix-sdk-ui`, reverting
unnecessary changes.
@jplatte jplatte force-pushed the jplatte/ui-rust2024 branch from d7e0d85 to caa71fa Compare July 13, 2025 10:19
Copy link
Member

@Hywan Hywan left a comment

Choose a reason for hiding this comment

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

Looks good to me, thanks!

@jplatte jplatte merged commit 679aa07 into main Jul 14, 2025
45 checks passed
@jplatte jplatte deleted the jplatte/ui-rust2024 branch July 14, 2025 17:50
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.

4 participants