diff --git a/CHANGELOG.md b/CHANGELOG.md index 4ca3e43..e8cefa8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,60 +1,5 @@ -# blue_archive-rs +# 0.5.2 - 2024-06-22 +## Fixes ⚒️ -## 0.5.1 - 2024-05-04 - -### Additions ✨ - -### Changes 📝 -- Modified displayed portions of `Student` and other struct fields. -- Changed `Released` struct to allow direct access to `japan`, `global` and `china` fields. -- Changed how `age` is obtained and how it is serialized/deserialized. This will be done as soon as it is read/written without a method call. - - Use `student.age` instead of `student.age()`. - -### Fixes ⚒️ - -## 0.5.0 - 2024-04-01 - -### Additions ✨ - -Added the new `blocking` feature. It is not enabled by default, so you must require it if you wish to use it! - -- This uses reqwest's `blocking` feature to handle all requests in a non-asynchronous way. - -### Changes 📝 - -- Changed how some internal deserialization and hashing works in the crate. - -### Fixes ⚒️ - -## 0.4.0 - 2024-03-23 - -### Additions ✨ - -- This changelog. It will be assumed that the latest update will be on the top. Read from ascending order. -- Currency API has been added. You can use the existing functions: - - `blue_archive::fetch_all_currencies` - - `blue_archive::fetch_currency_by_name` -- Equipment API has been added. You can use the existing functions: - - `blue_archive::fetch_all_equipment` - - `blue_archive::fetch_equipment_by_name` - - `blue_archive::fetch_equipment_by_category` -- Enemies API has been added. You can use the existing functions: - - `blue_archive::fetch_all_enemies` - - `blue_archive::fetch_enemy_by_name` - -### Changes 📝 - -- `impl Into` has been changed to a more suitable `AsRef`. This is an internal change related to name-based searching. -- `ID(u32)`'s inner value has been set to private, access the value by using `ID::to_u32`. -- Raid skills have been modified into enumerations, which allows for better differentiation of the data. -- Descriptions are now directly decoded through `serde` deserialization. - - Instead of `description()`, please use `description`. -- Student's first and last names have been made directly public through member field access. - - Instead of `Student::first_name()` & `Student::last_name()`, please use `Student::first_name` & `Student::last_name`. -- `Released` type has been changed to a struct with an inner tuple value, though to get the regions, you use the functions: - - `Released::japan()`, `Released::global()`, and `Released::china()` for example. - -### Fixes ⚒️ - -- Applied a change to the `Student::position` function, was passing in the `Student::armor_type` for some reason... oops! +- Resolved an issue with raid data. diff --git a/Cargo.toml b/Cargo.toml index 7ac6406..3f6a260 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,7 @@ + [package] name = "blue_archive" -version = "0.5.1" +version = "0.5.2" edition = "2021" license-file = "LICENSE" description = "A Blue Archive api wrapper for Rust, based off of SchaleDB's data: https://github.com/lonqie/SchaleDB" @@ -41,3 +42,6 @@ blocking = ["reqwest/blocking"] name = "get_all_students" path = "examples/blocking/get_all_students.rs" required-features = ["blocking"] + +[profile.dev] +debug-assertions = false diff --git a/examples/fetch_students_under_clubs.rs b/examples/fetch_students_under_clubs.rs index bc82c45..bfa8165 100644 --- a/examples/fetch_students_under_clubs.rs +++ b/examples/fetch_students_under_clubs.rs @@ -18,7 +18,9 @@ async fn main() -> anyhow::Result<()> { println!("|::{club}{}::|", " ".repeat(max - club.to_string().len())); // Iterating over each student and checking if they associate with the club. students.iter().for_each(|student| { - (student.club() == club).then(|| println!("{student}")); + if student.club() == club { + println!("{student}") + } }) }); diff --git a/src/types/raids.rs b/src/types/raids.rs index 7cf24d9..4c176c1 100644 --- a/src/types/raids.rs +++ b/src/types/raids.rs @@ -116,7 +116,7 @@ pub struct SpecialRaidSkill { atg_cost: u8, icon: String, effects: Option>, - name: String, + name: Option, #[serde( alias = "Desc", deserialize_with = "serialization::deserialize_html_encoded_string"