aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Sacchini <joey@sacchini.net>2020-09-30 12:02:02 -0400
committerJoey Sacchini <joey@sacchini.net>2020-09-30 12:02:02 -0400
commit3b6ddcb69918984ea122350b580c962a69eea017 (patch)
tree1d7f3a05296fb1e5988e6c3047978c57d46423b2
parent3c107787710f38de8baac879b7ef1e1fe8a13840 (diff)
downloadmcproto-rs-3b6ddcb69918984ea122350b580c962a69eea017.tar.gz
mcproto-rs-3b6ddcb69918984ea122350b580c962a69eea017.tar.bz2
mcproto-rs-3b6ddcb69918984ea122350b580c962a69eea017.zip
fix testrandom imports
-rw-r--r--src/nbt.rs4
-rw-r--r--src/status.rs4
2 files changed, 6 insertions, 2 deletions
diff --git a/src/nbt.rs b/src/nbt.rs
index 27eb051..80c0977 100644
--- a/src/nbt.rs
+++ b/src/nbt.rs
@@ -1,10 +1,12 @@
-use crate::protocol::TestRandom;
use crate::utils::{
read_int, read_long, read_one_byte, read_short, take, write_int, write_long, write_short,
};
use crate::{DeserializeErr, DeserializeResult, Deserialized};
use std::fmt;
+#[cfg(test)]
+use crate::protocol::TestRandom;
+
#[derive(Clone, Debug, PartialEq)]
pub struct NamedTag {
pub name: String,
diff --git a/src/status.rs b/src/status.rs
index 22f75bf..a0068ee 100644
--- a/src/status.rs
+++ b/src/status.rs
@@ -1,4 +1,3 @@
-use crate::protocol::TestRandom;
use crate::types::Chat;
use crate::uuid::UUID4;
use crate::{
@@ -8,6 +7,9 @@ use crate::{
use serde::{Deserialize, Deserializer, Serialize, Serializer};
use std::fmt;
+#[cfg(test)]
+use crate::protocol::TestRandom;
+
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
pub struct StatusSpec {
pub version: StatusVersionSpec,