From 9b9aa681d3bcf41a22291dff5d243b5fbb108339 Mon Sep 17 00:00:00 2001 From: Joey Sacchini Date: Fri, 2 Oct 2020 12:46:46 -0400 Subject: fix random generation and make raw packet accept a borrowed slice --- src/nbt.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/nbt.rs') diff --git a/src/nbt.rs b/src/nbt.rs index 80c0977..528ce78 100644 --- a/src/nbt.rs +++ b/src/nbt.rs @@ -30,8 +30,11 @@ impl NamedTag { impl TestRandom for NamedTag { fn test_gen_random() -> Self { Self { - name: String::test_gen_random(), - payload: Tag::test_gen_random(), + name: "".to_owned(), + payload: Tag::Compound(vec!(Self{ + name: String::test_gen_random(), + payload: Tag::test_gen_random(), + })), } } } -- cgit