1
Fork 0
mirror of https://github.com/redstrate/Kawari.git synced 2025-04-23 15:47:45 +00:00

Remove unused code & imports

This commit is contained in:
Joshua Goins 2025-03-16 14:50:40 -04:00
parent b1b0d9ac9f
commit 053730017f
3 changed files with 1 additions and 10 deletions

View file

@ -1,6 +1,5 @@
use std::time::{SystemTime, UNIX_EPOCH};
use binrw::BinRead;
use kawari::ipc::{GameMasterCommandType, IPCOpCode, IPCSegment, IPCStructData};
use kawari::oodle::FFXIVOodle;
use kawari::packet::{PacketSegment, SegmentType, State, send_keep_alive};

View file

@ -3,14 +3,6 @@ use std::{
time::{SystemTime, UNIX_EPOCH},
};
pub(crate) fn read_bool_from<T: std::convert::From<u8> + std::cmp::PartialEq>(x: T) -> bool {
x == T::from(1u8)
}
pub(crate) fn write_bool_as<T: std::convert::From<u8>>(x: &bool) -> T {
if *x { T::from(1u8) } else { T::from(0u8) }
}
pub(crate) fn read_string(byte_stream: Vec<u8>) -> String {
let str = String::from_utf8(byte_stream).unwrap();
str.trim_matches(char::from(0)).to_string() // trim \0 from the end of strings

View file

@ -3,7 +3,7 @@ use crate::{
ipc::{IPCOpCode, IPCSegment, IPCStructData},
packet::{PacketSegment, SegmentType},
timestamp_secs,
world::{CharacterMode, PlayerSpawn},
world::PlayerSpawn,
};
use super::{ChatMessage, Position, ZoneConnection};