From 9517c07833aa7eb38e883edc697c99d0ba7b52f5 Mon Sep 17 00:00:00 2001 From: endernon Date: Tue, 10 Sep 2024 19:25:08 +0100 Subject: [PATCH] Update this to use the crate now that idmangler-lib is public. I also needed to remove stat::StatID for it to work --- Cargo.lock | 30 ++++++++++++++++++++++++++++++ Cargo.toml | 1 + src/main.rs | 8 ++++---- 3 files changed, 35 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c14de90..b060cec 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -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" diff --git a/Cargo.toml b/Cargo.toml index 2ecae40..209d39c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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" diff --git a/src/main.rs b/src/main.rs index 96f4859..e48ba2f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -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),