aboutsummaryrefslogtreecommitdiff
path: root/azalea-protocol/src/packets/game
diff options
context:
space:
mode:
Diffstat (limited to 'azalea-protocol/src/packets/game')
-rw-r--r--azalea-protocol/src/packets/game/clientbound_player_chat_packet.rs6
-rw-r--r--azalea-protocol/src/packets/game/clientbound_recipe_packet.rs6
2 files changed, 7 insertions, 5 deletions
diff --git a/azalea-protocol/src/packets/game/clientbound_player_chat_packet.rs b/azalea-protocol/src/packets/game/clientbound_player_chat_packet.rs
index 1db3cba6..c9476a45 100644
--- a/azalea-protocol/src/packets/game/clientbound_player_chat_packet.rs
+++ b/azalea-protocol/src/packets/game/clientbound_player_chat_packet.rs
@@ -54,9 +54,11 @@ impl PlayerChatMessage {
.content
.decorated
.clone()
- .unwrap_or(Component::from(self.signed_body.content.plain.clone()));
+ .unwrap_or_else(|| Component::from(self.signed_body.content.plain.clone()));
}
- self.unsigned_content.clone().unwrap_or(self.message(true))
+ self.unsigned_content
+ .clone()
+ .unwrap_or_else(|| self.message(true))
}
}
diff --git a/azalea-protocol/src/packets/game/clientbound_recipe_packet.rs b/azalea-protocol/src/packets/game/clientbound_recipe_packet.rs
index 546eb6e4..4e19a114 100644
--- a/azalea-protocol/src/packets/game/clientbound_recipe_packet.rs
+++ b/azalea-protocol/src/packets/game/clientbound_recipe_packet.rs
@@ -46,9 +46,9 @@ impl McBufReadable for ClientboundRecipePacket {
};
Ok(ClientboundRecipePacket {
- action: action,
- settings: settings,
- recipes: recipes,
+ action,
+ settings,
+ recipes,
})
}
}