Abuse a closure instead of abusing options/iterators quite so much
This commit is contained in:
@@ -459,10 +459,10 @@ impl Room {
|
||||
self.participant_user_ids.contains(&user_id)
|
||||
}
|
||||
|
||||
pub fn follows(&self, leader_id: PeerId) -> &[PeerId] {
|
||||
pub fn follows(&self, leader_id: PeerId) -> Option<&[PeerId]> {
|
||||
self.follows_by_leader_id
|
||||
.get(&leader_id)
|
||||
.map_or(&[], |v| v.as_slice())
|
||||
.map(|v| v.as_slice())
|
||||
}
|
||||
|
||||
async fn handle_room_updated(
|
||||
|
||||
Reference in New Issue
Block a user