From 053730017fbca0aeedb9a15608d0e030ac65aac3 Mon Sep 17 00:00:00 2001 From: Joshua Goins Date: Sun, 16 Mar 2025 14:50:40 -0400 Subject: [PATCH] Remove unused code & imports --- src/bin/kawari-world.rs | 1 - src/common.rs | 8 -------- src/world/chat_handler.rs | 2 +- 3 files changed, 1 insertion(+), 10 deletions(-) diff --git a/src/bin/kawari-world.rs b/src/bin/kawari-world.rs index 34f23d6..22d6b17 100644 --- a/src/bin/kawari-world.rs +++ b/src/bin/kawari-world.rs @@ -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}; diff --git a/src/common.rs b/src/common.rs index ba18a01..05d65b6 100644 --- a/src/common.rs +++ b/src/common.rs @@ -3,14 +3,6 @@ use std::{ time::{SystemTime, UNIX_EPOCH}, }; -pub(crate) fn read_bool_from + std::cmp::PartialEq>(x: T) -> bool { - x == T::from(1u8) -} - -pub(crate) fn write_bool_as>(x: &bool) -> T { - if *x { T::from(1u8) } else { T::from(0u8) } -} - pub(crate) fn read_string(byte_stream: Vec) -> String { let str = String::from_utf8(byte_stream).unwrap(); str.trim_matches(char::from(0)).to_string() // trim \0 from the end of strings diff --git a/src/world/chat_handler.rs b/src/world/chat_handler.rs index 1a8f260..896300a 100644 --- a/src/world/chat_handler.rs +++ b/src/world/chat_handler.rs @@ -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};