Files
matrix-rust-sdk/crates
Valere Fedronic 4e8ceaac82 refactor(sdk-ui): remove expect() with better borrow (#6513)
<!-- description of the changes in this PR -->

Follow up on review on this PR
https://github.com/matrix-org/matrix-rust-sdk/pull/6494#discussion_r3146315397

Remove the usage of if/expect that was introduced because of a borrowing
problem.
Instead we use `ok_or_else`, but we clone the debug_string early (to
avoid needing to borrow event again in the `ok_or_else`), it is not
ideal either but better that the expect/panic

I also removed the `is_rtc_notification` and `is_live_location` that was
created I believe just to avoid the borrowing problem? They were only
used in test and it just a shortcut for `matches!()`

- [ ] I've documented the public API Changes in the appropriate
`CHANGELOG.md` files.
- [ ] This PR was made with the help of AI.

<!-- Sign-off, if not part of the commits -->
<!-- See CONTRIBUTING.md if you don't know what this is -->
Signed-off-by:
2026-05-01 11:40:15 +02:00
..
2026-04-30 17:04:39 +02:00
2026-04-30 17:04:39 +02:00
2026-03-31 16:57:50 +02:00
2026-04-28 10:45:22 +03:00