Use Cow's in TextComponent
We now don't always convert &str to Strings allowing us to use stack allocations
This commit is contained in:
1 parent
dfc0b8afe9
commit
a6d9ed216d
26 files changed
+134
-149
No files matched your search
@@ -375,7 +375,7 @@ impl Client {
|
||||
.unwrap_or_else(|_| self.close());
|
||||
}
|
||||
ConnectionState::Play => {
|
||||
self.try_send_packet(&CPlayDisconnect::new(TextComponent::from(reason)))
|
||||
self.try_send_packet(&CPlayDisconnect::new(TextComponent::text(reason)))
|
||||
.unwrap_or_else(|_| self.close());
|
||||
}
|
||||
_ => {
|
||||
|
||||
Reference in new issue
Block a user