From 9424aa72fa97f33321b9697d5a8f0ebd2cd74088 Mon Sep 17 00:00:00 2001 From: Joshua Goins Date: Sun, 2 Mar 2025 14:10:21 -0500 Subject: [PATCH] Remove now unused StructField struct --- src/primary_asset_id.rs | 4 +--- src/primary_asset_type.rs | 2 +- src/structs.rs | 20 -------------------- 3 files changed, 2 insertions(+), 24 deletions(-) diff --git a/src/primary_asset_id.rs b/src/primary_asset_id.rs index 950cb46..42bddaf 100644 --- a/src/primary_asset_id.rs +++ b/src/primary_asset_id.rs @@ -1,6 +1,4 @@ -use crate::{ - name_property::NameProperty, primary_asset_type::PrimaryAssetTypeStruct, structs::StructField, -}; +use crate::{name_property::NameProperty, primary_asset_type::PrimaryAssetTypeStruct}; use binrw::binrw; #[paramacro::serialized_struct("PrimaryAssetId")] diff --git a/src/primary_asset_type.rs b/src/primary_asset_type.rs index 0221571..706ee43 100644 --- a/src/primary_asset_type.rs +++ b/src/primary_asset_type.rs @@ -1,4 +1,4 @@ -use crate::{name_property::NameProperty, structs::StructField}; +use crate::name_property::NameProperty; use binrw::binrw; #[paramacro::serialized_struct("PrimaryAssetType")] diff --git a/src/structs.rs b/src/structs.rs index fcdebb5..fa8d029 100644 --- a/src/structs.rs +++ b/src/structs.rs @@ -63,26 +63,6 @@ pub struct PrimaryAssetNameProperty { pub key: Option>, } -// TODO: allow specializing into structs for StructProperty, and so on -#[binrw] -#[derive(Debug)] -#[br(import { name: &str, r#type: &str })] -pub struct StructField { - #[br(parse_with = read_string_with_length)] - #[bw(write_with = write_string_with_length)] - #[br(assert(property_name == name))] - pub property_name: String, - - #[br(parse_with = read_string_with_length)] - #[bw(write_with = write_string_with_length)] - #[br(assert(type_name == r#type))] - pub type_name: String, - - #[br(if(property_name != "None"))] - #[br(args { magic: &type_name, name: &property_name })] - pub key: Option>, -} - #[paramacro::serialized_struct("DAModuleItemData")] #[derive(Debug)] pub struct DAModuleItemDataStruct {