mirror of
https://github.com/matrix-org/matrix-rust-sdk.git
synced 2026-05-15 03:25:46 -04:00
Prior to this patch, to check a room exists, it was removed from the collection, then re-added if it exists. Instead of doing this `remove` + `insert` dance, we can simply use `get_mut`, which also returns an `Option`. This patch does that, in addition to rewrite the code to use a `match` instead of a `if` + `else`.