move config

This commit is contained in:
griffi-gh 2023-01-31 03:12:23 +01:00
parent 1c0409a9cf
commit a7a20093d6
2 changed files with 6 additions and 4 deletions

View file

@ -2,3 +2,8 @@ pub mod blocks;
pub mod networking; pub mod networking;
pub mod worldgen; pub mod worldgen;
pub mod chunk; pub mod chunk;
pub(crate) const BINCODE_CONFIG: bincode::config::Configuration<bincode::config::LittleEndian, bincode::config::Varint, bincode::config::SkipFixedArrayLength> = bincode::config::standard()
.with_little_endian()
.with_variable_int_encoding()
.skip_fixed_array_length();

View file

@ -1,10 +1,7 @@
use std::net::{UdpSocket, SocketAddr}; use std::net::{UdpSocket, SocketAddr};
use super::messages::ClientToServerMessage; use super::messages::ClientToServerMessage;
const BINCODE_CONFIG: bincode::config::Configuration<bincode::config::LittleEndian, bincode::config::Varint, bincode::config::SkipFixedArrayLength> = bincode::config::standard() use crate::BINCODE_CONFIG;
.with_little_endian()
.with_variable_int_encoding()
.skip_fixed_array_length();
pub struct Client { pub struct Client {
socket: UdpSocket socket: UdpSocket