Skip to content

Commit 486b1cd

Browse files
committed
Cleanup entity_location
1 parent 4d42087 commit 486b1cd

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

src/server/replication_messages/mutations.rs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,10 +117,14 @@ impl Mutations {
117117
///
118118
/// keeps allocated memory for reuse.
119119
pub(super) fn pop(&mut self) {
120-
let Some(mut mutations) = self.entity_location.and_then(|location| match location {
121-
EntityLocation::Related { index } => self.related[index].pop(),
122-
EntityLocation::Standalone => self.standalone.pop(),
123-
}) else {
120+
let Some(mut mutations) = self
121+
.entity_location
122+
.take()
123+
.and_then(|location| match location {
124+
EntityLocation::Related { index } => self.related[index].pop(),
125+
EntityLocation::Standalone => self.standalone.pop(),
126+
})
127+
else {
124128
return;
125129
};
126130

0 commit comments

Comments
 (0)