diff options
author | Joey Sacchini <joey@sacchini.net> | 2020-09-30 12:02:02 -0400 |
---|---|---|
committer | Joey Sacchini <joey@sacchini.net> | 2020-09-30 12:02:02 -0400 |
commit | 3b6ddcb69918984ea122350b580c962a69eea017 (patch) | |
tree | 1d7f3a05296fb1e5988e6c3047978c57d46423b2 | |
parent | 3c107787710f38de8baac879b7ef1e1fe8a13840 (diff) | |
download | mcproto-rs-3b6ddcb69918984ea122350b580c962a69eea017.tar.gz mcproto-rs-3b6ddcb69918984ea122350b580c962a69eea017.tar.bz2 mcproto-rs-3b6ddcb69918984ea122350b580c962a69eea017.zip |
fix testrandom imports
-rw-r--r-- | src/nbt.rs | 4 | ||||
-rw-r--r-- | src/status.rs | 4 |
2 files changed, 6 insertions, 2 deletions
@@ -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, |