From 3c2c325968db17f319038b309a3b49413829ff20 Mon Sep 17 00:00:00 2001 From: jake Date: Sun, 12 Nov 2023 00:25:00 -0700 Subject: [PATCH] fix a few warnings in tests --- tests/common.rs | 2 +- tests/test_bank.rs | 2 +- tests/test_character.rs | 6 +++--- tests/test_exp_gain.rs | 2 +- tests/test_item_actions.rs | 2 +- tests/test_item_drop.rs | 2 +- tests/test_item_id.rs | 2 +- tests/test_item_pickup.rs | 2 +- tests/test_item_use.rs | 2 +- tests/test_mags.rs | 2 +- tests/test_rooms.rs | 3 +-- tests/test_shops.rs | 2 +- tests/test_trade.rs | 2 +- 13 files changed, 15 insertions(+), 16 deletions(-) diff --git a/tests/common.rs b/tests/common.rs index 36c0d7a..db91ab8 100644 --- a/tests/common.rs +++ b/tests/common.rs @@ -77,7 +77,7 @@ pub fn standard_ship(gateway: EG) -> ShipServerState } //TODO: remove kb_conf_preset -pub async fn new_user_character(entity_gateway: &mut EG, username: &str, password: &str, kb_conf_preset: usize) -> (UserAccountEntity, CharacterEntity) { +pub async fn new_user_character(entity_gateway: &mut EG, username: &str, password: &str, _kb_conf_preset: usize) -> (UserAccountEntity, CharacterEntity) { let new_user = NewUserAccountEntity { email: format!("{}@pso.com", username), username: username.into(), diff --git a/tests/test_bank.rs b/tests/test_bank.rs index 07a6ee8..443da34 100644 --- a/tests/test_bank.rs +++ b/tests/test_bank.rs @@ -2,7 +2,7 @@ use std::collections::BTreeSet; use networking::serverstate::{ClientId, ServerState}; use entity::gateway::{EntityGateway, InMemoryGateway}; use entity::item; -use elseware::ship::ship::{ShipServerState, RecvShipPacket, SendShipPacket}; +use elseware::ship::ship::{RecvShipPacket, SendShipPacket}; use shops::StandardItemShops; use libpso::packet::ship::*; diff --git a/tests/test_character.rs b/tests/test_character.rs index ee78434..0c8cecf 100644 --- a/tests/test_character.rs +++ b/tests/test_character.rs @@ -1,8 +1,8 @@ use networking::serverstate::{ClientId, ServerState}; use entity::gateway::{EntityGateway, InMemoryGateway}; -use elseware::ship::ship::{ShipServerState, RecvShipPacket}; +use elseware::ship::ship::RecvShipPacket; -use libpso::character::settings::{DEFAULT_KEYBOARD_CONFIG1, DEFAULT_KEYBOARD_CONFIG2, DEFAULT_KEYBOARD_CONFIG3, DEFAULT_KEYBOARD_CONFIG4}; +use libpso::character::settings::{DEFAULT_KEYBOARD_CONFIG1, DEFAULT_KEYBOARD_CONFIG4}; use libpso::packet::ship::*; #[path = "common.rs"] @@ -33,7 +33,7 @@ async fn test_save_options() { async fn test_change_keyboard_mappings() { let mut entity_gateway = InMemoryGateway::default(); - let (user1, char1) = new_user_character(&mut entity_gateway, "a1", "a", 2).await; + let (user1, _char1) = new_user_character(&mut entity_gateway, "a1", "a", 2).await; let mut ship = standard_ship(entity_gateway.clone()); log_in_char(&mut ship, ClientId(1), "a1", "a").await; diff --git a/tests/test_exp_gain.rs b/tests/test_exp_gain.rs index 5e4bcf9..ae49fce 100644 --- a/tests/test_exp_gain.rs +++ b/tests/test_exp_gain.rs @@ -1,7 +1,7 @@ use networking::serverstate::{ClientId, ServerState}; use entity::gateway::{EntityGateway, InMemoryGateway}; use stats::leveltable::CharacterLevelTable; -use elseware::ship::ship::{ShipServerState, SendShipPacket, RecvShipPacket}; +use elseware::ship::ship::{SendShipPacket, RecvShipPacket}; use maps::variant::{MapVariant, MapVariantMode}; use maps::maps::Maps; use maps::area::MapArea; diff --git a/tests/test_item_actions.rs b/tests/test_item_actions.rs index 0212d08..758aa10 100644 --- a/tests/test_item_actions.rs +++ b/tests/test_item_actions.rs @@ -1,6 +1,6 @@ use networking::serverstate::{ClientId, ServerState}; use entity::gateway::{EntityGateway, InMemoryGateway}; -use elseware::ship::ship::{ShipServerState, RecvShipPacket}; +use elseware::ship::ship::RecvShipPacket; use entity::item; use libpso::packet::ship::*; diff --git a/tests/test_item_drop.rs b/tests/test_item_drop.rs index bac45ac..0c700bb 100644 --- a/tests/test_item_drop.rs +++ b/tests/test_item_drop.rs @@ -1,6 +1,6 @@ use networking::serverstate::{ClientId, ServerState}; use entity::gateway::InMemoryGateway; -use elseware::ship::ship::{ShipServerState, SendShipPacket, RecvShipPacket}; +use elseware::ship::ship::{SendShipPacket, RecvShipPacket}; use maps::monster::MonsterType; use drops::{StandardDropTable, MonsterDropStats, MonsterDropType}; use drops::rare_drop_table::{RareDropTable, RareDropRate, RareDropItem}; diff --git a/tests/test_item_id.rs b/tests/test_item_id.rs index ff8f4ad..ad2f860 100644 --- a/tests/test_item_id.rs +++ b/tests/test_item_id.rs @@ -1,7 +1,7 @@ use networking::serverstate::{ClientId, ServerState}; use entity::gateway::{EntityGateway, InMemoryGateway}; use entity::item; -use elseware::ship::ship::{ShipServerState, RecvShipPacket}; +use elseware::ship::ship::RecvShipPacket; use libpso::packet::ship::*; use libpso::packet::messages::*; diff --git a/tests/test_item_pickup.rs b/tests/test_item_pickup.rs index d1ba62e..3ec0b9c 100644 --- a/tests/test_item_pickup.rs +++ b/tests/test_item_pickup.rs @@ -1,7 +1,7 @@ use networking::serverstate::{ClientId, ServerState}; use entity::gateway::{EntityGateway, InMemoryGateway}; use entity::item; -use elseware::ship::ship::{ShipServerState, RecvShipPacket}; +use elseware::ship::ship::RecvShipPacket; use libpso::packet::ship::*; use libpso::packet::messages::*; diff --git a/tests/test_item_use.rs b/tests/test_item_use.rs index 0f28a18..13f2310 100644 --- a/tests/test_item_use.rs +++ b/tests/test_item_use.rs @@ -1,7 +1,7 @@ use networking::serverstate::{ClientId, ServerState}; use entity::gateway::{EntityGateway, InMemoryGateway}; use entity::item; -use elseware::ship::ship::{ShipServerState, RecvShipPacket}; +use elseware::ship::ship::RecvShipPacket; use entity::character::TechLevel; use libpso::packet::ship::*; diff --git a/tests/test_mags.rs b/tests/test_mags.rs index 963e71a..dac0e06 100644 --- a/tests/test_mags.rs +++ b/tests/test_mags.rs @@ -1,7 +1,7 @@ use networking::serverstate::{ClientId, ServerState}; use entity::gateway::{EntityGateway, InMemoryGateway}; use entity::item; -use elseware::ship::ship::{ShipServerState, RecvShipPacket}; +use elseware::ship::ship::RecvShipPacket; use entity::character::{CharacterClass, SectionID}; use libpso::packet::ship::*; diff --git a/tests/test_rooms.rs b/tests/test_rooms.rs index ced3e27..447ea7b 100644 --- a/tests/test_rooms.rs +++ b/tests/test_rooms.rs @@ -1,6 +1,6 @@ use networking::serverstate::{ClientId, ServerState}; use entity::gateway::{EntityGateway, InMemoryGateway}; -use elseware::ship::ship::{ShipServerState, RecvShipPacket, SendShipPacket}; +use elseware::ship::ship::{RecvShipPacket, SendShipPacket}; use libpso::packet::ship::*; //use libpso::packet::messages::*; @@ -16,7 +16,6 @@ async fn test_set_valid_quest_group() { let (_user1, _char1) = new_user_character(&mut entity_gateway, "a1", "a", 1).await; let mut ship = standard_ship_buildable(entity_gateway.clone()) .standard_quest_builder(Box::new(quests::load_standard_quests)) - .government_quest_builder(Box::new(quests::load_government_quests)) .build(); log_in_char(&mut ship, ClientId(1), "a1", "a").await; join_lobby(&mut ship, ClientId(1)).await; diff --git a/tests/test_shops.rs b/tests/test_shops.rs index 00d8f5c..cfcb749 100644 --- a/tests/test_shops.rs +++ b/tests/test_shops.rs @@ -1,7 +1,7 @@ use networking::serverstate::{ClientId, ServerState}; use entity::gateway::{EntityGateway, InMemoryGateway}; use entity::item; -use elseware::ship::ship::{ShipServerState, RecvShipPacket, SendShipPacket}; +use elseware::ship::ship::{RecvShipPacket, SendShipPacket}; use maps::room::Difficulty; use items::state::ItemStateError; use shops::StandardItemShops; diff --git a/tests/test_trade.rs b/tests/test_trade.rs index ec4fb3c..4a08d0a 100644 --- a/tests/test_trade.rs +++ b/tests/test_trade.rs @@ -2,7 +2,7 @@ use std::convert::TryInto; use networking::serverstate::{ClientId, ServerState}; use entity::gateway::{EntityGateway, InMemoryGateway}; use entity::item; -use elseware::ship::ship::{ShipServerState, RecvShipPacket, SendShipPacket, ShipError}; +use elseware::ship::ship::{ShipServerState, RecvShipPacket, SendShipPacket}; use entity::item::{Meseta, ItemEntity, InventoryItemEntity}; use elseware::ship::packet::handler::trade::TradeError;