From 38db231ea8fa0fb223e16637db0b6ec65b2b81ef Mon Sep 17 00:00:00 2001 From: mat Date: Thu, 12 Oct 2023 20:14:29 -0500 Subject: brigadier usages --- .../game/clientbound_command_suggestions_packet.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'azalea-protocol') diff --git a/azalea-protocol/src/packets/game/clientbound_command_suggestions_packet.rs b/azalea-protocol/src/packets/game/clientbound_command_suggestions_packet.rs index 88c6f29e..d1ad1240 100755 --- a/azalea-protocol/src/packets/game/clientbound_command_suggestions_packet.rs +++ b/azalea-protocol/src/packets/game/clientbound_command_suggestions_packet.rs @@ -19,14 +19,14 @@ mod tests { #[test] fn test_suggestions() { - let suggestions = Suggestions { - range: StringRange::new(0, 5), - suggestions: vec![Suggestion { - text: "foo".to_string(), - range: StringRange::new(1, 4), - tooltip: Some(FormattedText::from("bar".to_string())), - }], - }; + let suggestions = Suggestions::new( + StringRange::new(0, 5), + vec![Suggestion::new_with_tooltip( + StringRange::new(1, 4), + "foo", + FormattedText::from("bar".to_string()), + )], + ); let mut buf = Vec::new(); suggestions.write_into(&mut buf).unwrap(); let mut cursor = Cursor::new(&buf[..]); -- cgit v1.2.3