Update this to use the crate now that idmangler-lib is public. I also needed to remove stat::StatID for it to work

This commit is contained in:
endernon 2024-09-10 19:25:08 +01:00
parent e40a43ccaa
commit 9517c07833
3 changed files with 35 additions and 4 deletions

30
Cargo.lock generated
View file

@ -12,6 +12,15 @@ checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6"
name = "idlib"
version = "0.1.0"
[[package]]
name = "idmangler-lib"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "933f1ad62a44e77740c6787fd5077369f428edb4e5cc80948aa31f8fd317de71"
dependencies = [
"thiserror",
]
[[package]]
name = "itoa"
version = "1.0.11"
@ -30,6 +39,7 @@ version = "0.1.0"
dependencies = [
"base64",
"idlib",
"idmangler-lib",
"serde",
"serde_json",
]
@ -101,6 +111,26 @@ dependencies = [
"unicode-ident",
]
[[package]]
name = "thiserror"
version = "1.0.63"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724"
dependencies = [
"thiserror-impl",
]
[[package]]
name = "thiserror-impl"
version = "1.0.63"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261"
dependencies = [
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "unicode-ident"
version = "1.0.12"

View file

@ -6,5 +6,6 @@ edition = "2021"
[dependencies]
base64 = "0.22.1"
idlib = { path = "./idlib" }
idmangler-lib = "0.1.1"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"

View file

@ -1,4 +1,4 @@
use idlib::{
use idmangler_lib::{
data_transformer::{
decode, enddata::EndData, identdata::IdentificationData, namedata::NameData,
powderdata::PowderData, rerolldata::RerollData, shinydata::ShinyData, startdata::StartData,
@ -8,7 +8,7 @@ use idlib::{
types::{
itemtype::ItemType,
powder::Powders,
stat::{RollType, Stat, StatId},
stat::{RollType, Stat},
transform::TransformVersion,
},
};
@ -105,10 +105,10 @@ fn main() {
idvec.push(
(
Stat {
kind: StatId(match id_id {
kind: match id_id {
Some(ide) => *ide,
None => panic!("There is a mismatched ID, and this message has replaced where the line is meant to be")
}),
},
base: Some(id_base),
roll: match id_roll{
Some(rolle) => RollType::Value(rolle),