room/broadcast_presence: move matches! blocks together
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
parent
d7c4bcd87b
commit
bcc2f7d85e
1 changed files with 2 additions and 3 deletions
|
@ -75,6 +75,8 @@ impl Room {
|
|||
mode: BroadcastPresence,
|
||||
) -> Result<(), Error> {
|
||||
let leave = matches!(mode, BroadcastPresence::Leave);
|
||||
let sync = matches!(mode, BroadcastPresence::Join | BroadcastPresence::Resync);
|
||||
let update = matches!(mode, BroadcastPresence::Join | BroadcastPresence::Update);
|
||||
|
||||
// All participants to new participant
|
||||
let presence_to_new = Presence::new(if leave {
|
||||
|
@ -105,9 +107,6 @@ impl Room {
|
|||
}
|
||||
.into()]);
|
||||
|
||||
let sync = matches!(mode, BroadcastPresence::Join | BroadcastPresence::Resync);
|
||||
let update = matches!(mode, BroadcastPresence::Join | BroadcastPresence::Update);
|
||||
|
||||
for (_, other) in self.occupants.iter() {
|
||||
if own_occupant.nick == other.nick {
|
||||
continue;
|
||||
|
|
Loading…
Reference in a new issue