diff options
Diffstat (limited to 'azalea-protocol/src/packets/game/clientbound_command_suggestions_packet.rs')
| -rwxr-xr-x | azalea-protocol/src/packets/game/clientbound_command_suggestions_packet.rs | 16 |
1 files changed, 8 insertions, 8 deletions
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[..]); |
