Remove now unused StructField struct

This commit is contained in:
Joshua Goins 2025-03-02 14:10:21 -05:00
parent 4801c2678a
commit 9424aa72fa
3 changed files with 2 additions and 24 deletions

View file

@ -1,6 +1,4 @@
use crate::{ use crate::{name_property::NameProperty, primary_asset_type::PrimaryAssetTypeStruct};
name_property::NameProperty, primary_asset_type::PrimaryAssetTypeStruct, structs::StructField,
};
use binrw::binrw; use binrw::binrw;
#[paramacro::serialized_struct("PrimaryAssetId")] #[paramacro::serialized_struct("PrimaryAssetId")]

View file

@ -1,4 +1,4 @@
use crate::{name_property::NameProperty, structs::StructField}; use crate::name_property::NameProperty;
use binrw::binrw; use binrw::binrw;
#[paramacro::serialized_struct("PrimaryAssetType")] #[paramacro::serialized_struct("PrimaryAssetType")]

View file

@ -63,26 +63,6 @@ pub struct PrimaryAssetNameProperty {
pub key: Option<Box<Property>>, pub key: Option<Box<Property>>,
} }
// 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<Box<Property>>,
}
#[paramacro::serialized_struct("DAModuleItemData")] #[paramacro::serialized_struct("DAModuleItemData")]
#[derive(Debug)] #[derive(Debug)]
pub struct DAModuleItemDataStruct { pub struct DAModuleItemDataStruct {