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:
parent
b1b0d9ac9f
commit
053730017f
3 changed files with 1 additions and 10 deletions
|
@ -1,6 +1,5 @@
|
||||||
use std::time::{SystemTime, UNIX_EPOCH};
|
use std::time::{SystemTime, UNIX_EPOCH};
|
||||||
|
|
||||||
use binrw::BinRead;
|
|
||||||
use kawari::ipc::{GameMasterCommandType, IPCOpCode, IPCSegment, IPCStructData};
|
use kawari::ipc::{GameMasterCommandType, IPCOpCode, IPCSegment, IPCStructData};
|
||||||
use kawari::oodle::FFXIVOodle;
|
use kawari::oodle::FFXIVOodle;
|
||||||
use kawari::packet::{PacketSegment, SegmentType, State, send_keep_alive};
|
use kawari::packet::{PacketSegment, SegmentType, State, send_keep_alive};
|
||||||
|
|
|
@ -3,14 +3,6 @@ use std::{
|
||||||
time::{SystemTime, UNIX_EPOCH},
|
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 {
|
pub(crate) fn read_string(byte_stream: Vec<u8>) -> String {
|
||||||
let str = String::from_utf8(byte_stream).unwrap();
|
let str = String::from_utf8(byte_stream).unwrap();
|
||||||
str.trim_matches(char::from(0)).to_string() // trim \0 from the end of strings
|
str.trim_matches(char::from(0)).to_string() // trim \0 from the end of strings
|
||||||
|
|
|
@ -3,7 +3,7 @@ use crate::{
|
||||||
ipc::{IPCOpCode, IPCSegment, IPCStructData},
|
ipc::{IPCOpCode, IPCSegment, IPCStructData},
|
||||||
packet::{PacketSegment, SegmentType},
|
packet::{PacketSegment, SegmentType},
|
||||||
timestamp_secs,
|
timestamp_secs,
|
||||||
world::{CharacterMode, PlayerSpawn},
|
world::PlayerSpawn,
|
||||||
};
|
};
|
||||||
|
|
||||||
use super::{ChatMessage, Position, ZoneConnection};
|
use super::{ChatMessage, Position, ZoneConnection};
|
||||||
|
|
Loading…
Add table
Reference in a new issue