fix a few warnings in tests
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing

This commit is contained in:
jake 2023-11-12 00:25:00 -07:00
parent 2cede0077a
commit 5fc23cd7ca
13 changed files with 15 additions and 16 deletions

View File

@ -77,7 +77,7 @@ pub fn standard_ship<EG: EntityGateway + Clone>(gateway: EG) -> ShipServerState
}
//TODO: remove kb_conf_preset
pub async fn new_user_character<EG: EntityGateway + Clone>(entity_gateway: &mut EG, username: &str, password: &str, kb_conf_preset: usize) -> (UserAccountEntity, CharacterEntity) {
pub async fn new_user_character<EG: EntityGateway + Clone>(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(),

View File

@ -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::*;

View File

@ -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;

View File

@ -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;

View File

@ -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::*;

View File

@ -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};

View File

@ -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::*;

View File

@ -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::*;

View File

@ -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::*;

View File

@ -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::*;

View File

@ -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;

View File

@ -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;

View File

@ -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;