Skip to content

Commit

Permalink
Swap order of InitMessage::is_empty checks
Browse files Browse the repository at this point in the history
Check most unlikely conditions first.
  • Loading branch information
Shatur committed Nov 16, 2024
1 parent 4fe95b3 commit 972ab21
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/server/replication_messages/init_message.rs
Original file line number Diff line number Diff line change
Expand Up @@ -178,10 +178,10 @@ impl InitMessage {
}

pub(crate) fn is_empty(&self) -> bool {
self.mappings.is_empty()
self.changes.is_empty()
&& self.despawns.is_empty()
&& self.removals.is_empty()
&& self.changes.is_empty()
&& self.mappings.is_empty()
}

pub(crate) fn send(
Expand Down

0 comments on commit 972ab21

Please sign in to comment.