mirror of
https://github.com/matrix-org/matrix-rust-sdk.git
synced 2026-06-10 17:34:20 -04:00
<!-- 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: