Fix newer Clippy warnings for 1.80 (#301)

This commit is contained in:
Jarkko Sakkinen 2024-08-01 06:02:42 +03:00 committed by GitHub
parent d8d8e91295
commit 4fc71c9291
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 41 additions and 38 deletions

View file

@ -1346,9 +1346,7 @@ impl ChatStore {
/// Get a joined room.
pub fn get_joined_room(&self, room_id: &RoomId) -> Option<MatrixRoom> {
let Some(room) = self.worker.client.get_room(room_id) else {
return None;
};
let room = self.worker.client.get_room(room_id)?;
if room.state() == MatrixRoomState::Joined {
Some(room)