-
Notifications
You must be signed in to change notification settings - Fork 314
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
Conversation
Codecov ReportAttention: Patch coverage is
✅ All tests successful. No failed tests found. 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. |
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.
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" |
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.
🥳
crates/matrix-sdk-ui/src/room_list_service/filters/fuzzy_match_room_name.rs
Show resolved
Hide resolved
} else { | ||
false | ||
} | ||
if let Some(edit) = best_edit { edit_item(event, edit) } else { false } |
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.
Ending a function in if let
feels super strange to me, I think I liked the previous version better.
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.
It's the same, but formatted differently, right?
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.
Yep, just one lined.
assert!( | ||
event |
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.
Got mixed feelings about this one too.
crates/matrix-sdk-ui/src/room_list_service/filters/fuzzy_match_room_name.rs
Show resolved
Hide resolved
Automated with `cargo fix --edition -p matrix-sdk-ui`, reverting unnecessary changes.
d7e0d85
to
caa71fa
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.
Looks good to me, thanks!
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