Merge pull request 'hella warnings cleanup pt 1. remove unused imports, allow deadcode and unused results' (#30) from cleanup_warnings into master
Reviewed-by: jake <jake@sharnoth.com>
This commit is contained in:
commit
cdd81265c6
@ -1,8 +1,3 @@
|
|||||||
use std::convert::{TryFrom, Into};
|
|
||||||
use std::io::{Read, Seek};
|
|
||||||
use crate::{PSOPacketData, PacketParseError};
|
|
||||||
|
|
||||||
|
|
||||||
#[derive(Debug, Copy, Clone, PartialEq)]
|
#[derive(Debug, Copy, Clone, PartialEq)]
|
||||||
pub enum ArmorType {
|
pub enum ArmorType {
|
||||||
Frame,
|
Frame,
|
||||||
|
@ -1,10 +1,11 @@
|
|||||||
|
#![allow(dead_code)]
|
||||||
pub mod weapon;
|
pub mod weapon;
|
||||||
pub mod tool;
|
pub mod tool;
|
||||||
pub mod armor;
|
pub mod armor;
|
||||||
pub mod shield;
|
pub mod shield;
|
||||||
|
|
||||||
use std::io::{Read, Seek};
|
use std::io::{Read, Seek};
|
||||||
use crate::{PSOPacketData, PacketParseError};
|
use crate::{PacketParseError};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -20,7 +21,7 @@ pub enum Item {
|
|||||||
|
|
||||||
|
|
||||||
impl Item {
|
impl Item {
|
||||||
fn from_bytes<R: Read + Seek>(cursor: &mut R) -> Result<Self, PacketParseError> {
|
fn from_bytes<R: Read + Seek>(_cursor: &mut R) -> Result<Self, PacketParseError> {
|
||||||
unimplemented!()
|
unimplemented!()
|
||||||
}
|
}
|
||||||
pub fn as_bytes(&self) -> [u8; 16] {
|
pub fn as_bytes(&self) -> [u8; 16] {
|
||||||
|
@ -1,8 +1,3 @@
|
|||||||
use std::convert::{TryFrom, Into};
|
|
||||||
use std::io::{Read, Seek};
|
|
||||||
use crate::{PSOPacketData, PacketParseError};
|
|
||||||
|
|
||||||
|
|
||||||
#[derive(Debug, Copy, Clone, PartialEq)]
|
#[derive(Debug, Copy, Clone, PartialEq)]
|
||||||
pub enum ShieldType {
|
pub enum ShieldType {
|
||||||
Barrier,
|
Barrier,
|
||||||
|
@ -1,9 +1,5 @@
|
|||||||
use std::convert::{TryFrom, Into};
|
use std::convert::{TryFrom, Into};
|
||||||
|
|
||||||
use std::io::{Read, Seek};
|
|
||||||
use crate::{PSOPacketData, PacketParseError};
|
|
||||||
|
|
||||||
|
|
||||||
#[derive(Debug, Copy, Clone, PartialEq)]
|
#[derive(Debug, Copy, Clone, PartialEq)]
|
||||||
pub enum Attribute {
|
pub enum Attribute {
|
||||||
Native,
|
Native,
|
||||||
|
@ -546,7 +546,7 @@ mod tests {
|
|||||||
#[test]
|
#[test]
|
||||||
fn test_key_settings_reply() {
|
fn test_key_settings_reply() {
|
||||||
use super::PSOPacket;
|
use super::PSOPacket;
|
||||||
use rand::{Rng, RngCore};
|
use rand::{Rng};
|
||||||
|
|
||||||
let mut rng = rand::thread_rng();
|
let mut rng = rand::thread_rng();
|
||||||
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
use std::io::{Seek, SeekFrom};
|
#![allow(unused_must_use)]
|
||||||
|
use std::io::{SeekFrom};
|
||||||
|
|
||||||
use psopacket::pso_message;
|
use psopacket::pso_message;
|
||||||
use crate::{PSOPacketData, PacketParseError};
|
use crate::{PSOPacketData, PacketParseError};
|
||||||
@ -757,7 +758,7 @@ pub struct DropCoordinates {
|
|||||||
drop_area: u32,
|
drop_area: u32,
|
||||||
x: f32,
|
x: f32,
|
||||||
z: f32,
|
z: f32,
|
||||||
drop_ID: u32,
|
drop_id: u32,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[pso_message(0xC4)]
|
#[pso_message(0xC4)]
|
||||||
@ -1062,7 +1063,7 @@ impl PSOPacketData for GameMessage {
|
|||||||
cur.seek(SeekFrom::Current(-2)); // Cursor doesn't implement Peek?
|
cur.seek(SeekFrom::Current(-2)); // Cursor doesn't implement Peek?
|
||||||
match byte[0] {
|
match byte[0] {
|
||||||
PlayerActivatedSwitch::CMD => Ok(GameMessage::PlayerActivatedSwitch(PlayerActivatedSwitch::from_bytes(&mut cur)?)),
|
PlayerActivatedSwitch::CMD => Ok(GameMessage::PlayerActivatedSwitch(PlayerActivatedSwitch::from_bytes(&mut cur)?)),
|
||||||
GuildcardSend::CMD => Ok(GameMessage::GuildcardSend(GuildcardSend::from_bytes(&mut cur)?)),
|
GuildcardSend::CMD if len[0] == 1 => Ok(GameMessage::GuildcardSend(GuildcardSend::from_bytes(&mut cur)?)),
|
||||||
GuildcardRecv::CMD => Ok(GameMessage::GuildcardRecv(GuildcardRecv::from_bytes(&mut cur)?)),
|
GuildcardRecv::CMD => Ok(GameMessage::GuildcardRecv(GuildcardRecv::from_bytes(&mut cur)?)),
|
||||||
SymbolChat::CMD => Ok(GameMessage::SymbolChat(SymbolChat::from_bytes(&mut cur)?)),
|
SymbolChat::CMD => Ok(GameMessage::SymbolChat(SymbolChat::from_bytes(&mut cur)?)),
|
||||||
MobAttack::CMD => Ok(GameMessage::MobAttack(MobAttack::from_bytes(&mut cur)?)),
|
MobAttack::CMD => Ok(GameMessage::MobAttack(MobAttack::from_bytes(&mut cur)?)),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user