aboutsummaryrefslogtreecommitdiff
path: root/src/nbt.rs
diff options
context:
space:
mode:
authorJoey Sacchini <joey@sacchini.net>2020-10-02 12:46:46 -0400
committerJoey Sacchini <joey@sacchini.net>2020-10-02 12:46:46 -0400
commit9b9aa681d3bcf41a22291dff5d243b5fbb108339 (patch)
tree08ee19d486f2b444ac25b462c01ce32679dc0c15 /src/nbt.rs
parentb3e6c71ddcd554e0ef350b93feda8a8eb0de76ab (diff)
downloadmcproto-rs-9b9aa681d3bcf41a22291dff5d243b5fbb108339.tar.gz
mcproto-rs-9b9aa681d3bcf41a22291dff5d243b5fbb108339.tar.bz2
mcproto-rs-9b9aa681d3bcf41a22291dff5d243b5fbb108339.zip
fix random generation and make raw packet accept a borrowed slice
Diffstat (limited to 'src/nbt.rs')
-rw-r--r--src/nbt.rs7
1 files changed, 5 insertions, 2 deletions
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(),
+ })),
}
}
}