Use super:: relative instead of crate::protocol absolute import paths

This commit is contained in:
ice_iix 2019-05-25 12:22:46 -07:00
parent ef334643cc
commit 367c3e5e09
3 changed files with 4 additions and 4 deletions

View File

@ -4,7 +4,7 @@ use std::io;
use byteorder::WriteBytesExt;
use log::debug;
use crate::protocol::{Serializable, Error, LenPrefixed, VarInt};
use super::{Serializable, Error, LenPrefixed, VarInt};
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum Phase {
@ -147,7 +147,7 @@ impl Serializable for FmlHs {
})
},
3 => {
let protocol_version = unsafe { crate::protocol::CURRENT_PROTOCOL_VERSION };
let protocol_version = unsafe { super::CURRENT_PROTOCOL_VERSION };
if protocol_version >= 47 {
Ok(FmlHs::RegistryData {

View File

@ -2484,7 +2484,7 @@ impl Serializable for Recipe {
let a = String::read_from(buf)?;
let b = String::read_from(buf)?;
let protocol_version = unsafe { crate::protocol::CURRENT_PROTOCOL_VERSION };
let protocol_version = unsafe { super::CURRENT_PROTOCOL_VERSION };
// 1.14+ swaps recipe identifier and type, and adds namespace to type
if protocol_version >= 477 {

View File

@ -1,4 +1,4 @@
use crate::protocol::*;
use super::*;
mod v1_14_1;
mod v1_14;