aboutsummaryrefslogtreecommitdiff
path: root/azalea-protocol/src/packets
diff options
context:
space:
mode:
Diffstat (limited to 'azalea-protocol/src/packets')
-rw-r--r--azalea-protocol/src/packets/game/c_command_suggestions.rs2
-rw-r--r--azalea-protocol/src/packets/game/c_commands.rs4
-rw-r--r--azalea-protocol/src/packets/game/c_disguised_chat.rs2
-rw-r--r--azalea-protocol/src/packets/game/c_player_chat.rs2
-rw-r--r--azalea-protocol/src/packets/game/c_system_chat.rs6
-rw-r--r--azalea-protocol/src/packets/game/c_update_advancements.rs8
-rw-r--r--azalea-protocol/src/packets/game/s_set_jigsaw_block.rs4
-rw-r--r--azalea-protocol/src/packets/login/s_hello.rs2
8 files changed, 15 insertions, 15 deletions
diff --git a/azalea-protocol/src/packets/game/c_command_suggestions.rs b/azalea-protocol/src/packets/game/c_command_suggestions.rs
index 4512b9b3..eff953ee 100644
--- a/azalea-protocol/src/packets/game/c_command_suggestions.rs
+++ b/azalea-protocol/src/packets/game/c_command_suggestions.rs
@@ -25,7 +25,7 @@ mod tests {
vec![Suggestion::new_with_tooltip(
StringRange::new(1, 4),
"foo",
- "bar".to_string(),
+ "bar".to_owned(),
)],
);
let mut buf = Vec::new();
diff --git a/azalea-protocol/src/packets/game/c_commands.rs b/azalea-protocol/src/packets/game/c_commands.rs
index f96e7ef0..758c8f27 100644
--- a/azalea-protocol/src/packets/game/c_commands.rs
+++ b/azalea-protocol/src/packets/game/c_commands.rs
@@ -360,7 +360,7 @@ mod tests {
children: vec![],
redirect_node: None,
node_type: NodeType::Literal {
- name: "String".to_string(),
+ name: "String".to_owned(),
},
is_restricted: false,
};
@@ -378,7 +378,7 @@ mod tests {
children: vec![6, 9],
redirect_node: Some(5),
node_type: NodeType::Argument {
- name: "position".to_string(),
+ name: "position".to_owned(),
parser: BrigadierParser::Vec3,
suggestions_type: Some(Identifier::new("minecraft:test_suggestion")),
},
diff --git a/azalea-protocol/src/packets/game/c_disguised_chat.rs b/azalea-protocol/src/packets/game/c_disguised_chat.rs
index 1b7505c6..31cdc0c6 100644
--- a/azalea-protocol/src/packets/game/c_disguised_chat.rs
+++ b/azalea-protocol/src/packets/game/c_disguised_chat.rs
@@ -50,7 +50,7 @@ impl ClientboundDisguisedChat {
}
let translation_key = self.chat_type.translation_key(registries);
- let component = TranslatableComponent::new(translation_key.to_string(), args);
+ let component = TranslatableComponent::new(translation_key.to_owned(), args);
FormattedText::Translatable(component)
}
diff --git a/azalea-protocol/src/packets/game/c_player_chat.rs b/azalea-protocol/src/packets/game/c_player_chat.rs
index 3904d0d9..41e457a2 100644
--- a/azalea-protocol/src/packets/game/c_player_chat.rs
+++ b/azalea-protocol/src/packets/game/c_player_chat.rs
@@ -162,7 +162,7 @@ impl ClientboundPlayerChat {
// TODO: implement chat type registry and apply the styles from it here
let translation_key = self.chat_type.translation_key(registries);
- let component = TranslatableComponent::new(translation_key.to_string(), args);
+ let component = TranslatableComponent::new(translation_key.to_owned(), args);
FormattedText::Translatable(component)
}
diff --git a/azalea-protocol/src/packets/game/c_system_chat.rs b/azalea-protocol/src/packets/game/c_system_chat.rs
index c57c0df0..6ad67ccd 100644
--- a/azalea-protocol/src/packets/game/c_system_chat.rs
+++ b/azalea-protocol/src/packets/game/c_system_chat.rs
@@ -26,7 +26,7 @@ mod tests {
let packet = ClientboundSystemChat::azalea_read(&mut Cursor::new(&bytes)).unwrap();
assert_eq!(
packet.content.to_string(),
- "[py5: Gave 1 [Diamond Pickaxe] to py5]".to_string()
+ "[py5: Gave 1 [Diamond Pickaxe] to py5]".to_owned()
);
}
@@ -39,7 +39,7 @@ mod tests {
let packet = ClientboundSystemChat::azalea_read(&mut Cursor::new(&bytes)).unwrap();
assert_eq!(
packet.content.to_string(),
- "Displaying particle minecraft:dust".to_string()
+ "Displaying particle minecraft:dust".to_owned()
);
}
@@ -53,7 +53,7 @@ mod tests {
assert_eq!(
packet.content.to_string().trim(),
- "Position in queue: 328\nYou can purchase priority queue status to join the server faster, visit shop.2b2t.org".to_string()
+ "Position in queue: 328\nYou can purchase priority queue status to join the server faster, visit shop.2b2t.org".to_owned()
);
}
diff --git a/azalea-protocol/src/packets/game/c_update_advancements.rs b/azalea-protocol/src/packets/game/c_update_advancements.rs
index bba53998..6f3e960e 100644
--- a/azalea-protocol/src/packets/game/c_update_advancements.rs
+++ b/azalea-protocol/src/packets/game/c_update_advancements.rs
@@ -5,9 +5,9 @@ use std::{
use azalea_buf::AzBuf;
use azalea_chat::FormattedText;
-use azalea_registry::identifier::Identifier;
use azalea_inventory::ItemStack;
use azalea_protocol_macros::ClientboundGamePacket;
+use azalea_registry::identifier::Identifier;
use indexmap::IndexMap;
#[derive(Clone, Debug, AzBuf, PartialEq, ClientboundGamePacket)]
@@ -135,8 +135,8 @@ mod tests {
value: Advancement {
parent_id: None,
display: Some(DisplayInfo {
- title: FormattedText::from("title".to_string()),
- description: FormattedText::from("description".to_string()),
+ title: FormattedText::from("title".to_owned()),
+ description: FormattedText::from("description".to_owned()),
icon: ItemStack::Empty,
frame: FrameType::Task,
show_toast: true,
@@ -155,7 +155,7 @@ mod tests {
progress: [(
Identifier::new("minecraft:test3"),
[(
- "minecraft:test4".to_string(),
+ "minecraft:test4".to_owned(),
CriterionProgress {
date: Some(123456789),
},
diff --git a/azalea-protocol/src/packets/game/s_set_jigsaw_block.rs b/azalea-protocol/src/packets/game/s_set_jigsaw_block.rs
index 2203d3e9..64a46c02 100644
--- a/azalea-protocol/src/packets/game/s_set_jigsaw_block.rs
+++ b/azalea-protocol/src/packets/game/s_set_jigsaw_block.rs
@@ -43,8 +43,8 @@ impl AzaleaRead for JointType {
impl AzaleaWrite for JointType {
fn azalea_write(&self, buf: &mut impl Write) -> io::Result<()> {
match self {
- JointType::Rollable => "rollable".to_string().azalea_write(buf)?,
- JointType::Aligned => "aligned".to_string().azalea_write(buf)?,
+ JointType::Rollable => "rollable".to_owned().azalea_write(buf)?,
+ JointType::Aligned => "aligned".to_owned().azalea_write(buf)?,
};
Ok(())
}
diff --git a/azalea-protocol/src/packets/login/s_hello.rs b/azalea-protocol/src/packets/login/s_hello.rs
index 86fc9f49..a65fe6a1 100644
--- a/azalea-protocol/src/packets/login/s_hello.rs
+++ b/azalea-protocol/src/packets/login/s_hello.rs
@@ -20,7 +20,7 @@ mod tests {
#[test]
fn test_read_write() {
let packet = ServerboundHello {
- name: "test".to_string(),
+ name: "test".to_owned(),
profile_id: Uuid::nil(),
};
let mut buf: Vec<u8> = Vec::new();