From 49740f5f8f489e3b6aacf3e0ae99e2caeb983288 Mon Sep 17 00:00:00 2001 From: Greaka Date: Mon, 18 Mar 2024 11:20:29 +0100 Subject: [PATCH] bump model version --- .github/workflows/integration_test.yml | 2 +- http/tests/pets.rs | 4 ++-- model/Cargo.toml | 2 +- model/src/authenticated/characters.rs | 4 +++- model/src/game_mechanics.rs | 2 +- model/src/game_mechanics/pets.rs | 16 ++++++++-------- 6 files changed, 16 insertions(+), 14 deletions(-) diff --git a/.github/workflows/integration_test.yml b/.github/workflows/integration_test.yml index c49a504..55b7d62 100644 --- a/.github/workflows/integration_test.yml +++ b/.github/workflows/integration_test.yml @@ -2,7 +2,7 @@ name: integration_test on: push: - pull_request: + pull_request_target: schedule: - cron: '30 5 * * *' workflow_dispatch: diff --git a/http/tests/pets.rs b/http/tests/pets.rs index 4bded08..2ee7e74 100644 --- a/http/tests/pets.rs +++ b/http/tests/pets.rs @@ -1,8 +1,8 @@ #![cfg(feature = "blocking")] use gw2lib::{ - model::game_mechanics::pets::{Pet, PetId}, - Requester + model::game_mechanics::pets::{Pet, PetId}, + Requester, }; pub mod setup; diff --git a/model/Cargo.toml b/model/Cargo.toml index acf50ab..7c94bbe 100644 --- a/model/Cargo.toml +++ b/model/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "gw2lib-model" -version = "2.1.4" +version = "2.1.5" authors = ["Greaka "] edition = "2021" workspace = "../" diff --git a/model/src/authenticated/characters.rs b/model/src/authenticated/characters.rs index 750ac0d..4199865 100644 --- a/model/src/authenticated/characters.rs +++ b/model/src/authenticated/characters.rs @@ -2,8 +2,10 @@ use std::collections::HashMap; use serde::{Deserialize, Serialize}; +// todo: remove this pub use on next breaking version +pub use crate::game_mechanics::pets::PetId; use crate::{ - game_mechanics::{skills::SkillId, specializations::SpecializationId, traits::TraitId, pets::PetId}, + game_mechanics::{skills::SkillId, specializations::SpecializationId, traits::TraitId}, items::{itemstats::StatsId, recipes::RecipeId, skins::SkinId, AttributeType, ItemId}, misc::{colors::ColorId, titles::TitleId}, pvp::amulets::AmuletId, diff --git a/model/src/game_mechanics.rs b/model/src/game_mechanics.rs index f3c252c..56ebe26 100644 --- a/model/src/game_mechanics.rs +++ b/model/src/game_mechanics.rs @@ -1,4 +1,4 @@ +pub mod pets; pub mod skills; pub mod specializations; pub mod traits; -pub mod pets; diff --git a/model/src/game_mechanics/pets.rs b/model/src/game_mechanics/pets.rs index 257f4ed..e2f16c0 100644 --- a/model/src/game_mechanics/pets.rs +++ b/model/src/game_mechanics/pets.rs @@ -1,24 +1,24 @@ use serde::{Deserialize, Serialize}; -use crate::*; pub use crate::game_mechanics::skills::SkillId; +use crate::*; pub type PetId = u16; #[derive(Clone, Debug, Serialize, Deserialize, PartialEq, Eq)] #[cfg_attr(test, serde(deny_unknown_fields))] pub struct PetSkill { - pub id: SkillId, + pub id: SkillId, } #[derive(Clone, Debug, Serialize, Deserialize, PartialEq, Eq)] #[cfg_attr(test, serde(deny_unknown_fields))] pub struct Pet { - pub id: PetId, - pub name: String, - pub description: String, - pub icon: Option, - pub skills: Vec, + pub id: PetId, + pub name: String, + pub description: String, + pub icon: Option, + pub skills: Vec, } impl Endpoint for Pet { @@ -29,7 +29,7 @@ impl Endpoint for Pet { } impl EndpointWithId for Pet { - type IdType = PetId; + type IdType = PetId; } impl BulkEndpoint for Pet {