From 00d8ebdb38ccf351a1a56344e5ed3b0f28cc7c8d Mon Sep 17 00:00:00 2001 From: davidemazzocchi Date: Tue, 11 Nov 2025 07:37:55 +0100 Subject: [PATCH] test: add two more field to struct Item to test i32 and u32 values --- 01.workspace/heave/src/str/item.rs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/01.workspace/heave/src/str/item.rs b/01.workspace/heave/src/str/item.rs index 93e22f7..19e66fc 100644 --- a/01.workspace/heave/src/str/item.rs +++ b/01.workspace/heave/src/str/item.rs @@ -14,6 +14,8 @@ pub struct O { pub subclass: Option, pub category: Option, pub tag: String, + pub supplier_code: u32, + pub supplier_rank: i32, } #[cfg(test)] impl EAV for Item { @@ -34,7 +36,9 @@ impl From for Entity { .with_attribute("sell_trend", value.sell_trend) .with_attribute("in_stock", value.in_stock) .with_opt_attribute("vategory", value.category) - .with_attribute("tag", value.tag); + .with_attribute("tag", value.tag) + .with_attribute("supplier_code", value.supplier_code) + .with_attribute("supplier_rank", value.supplier_rank); if let Some(subclass) = value.subclass { entity = entity.with_subclass(&subclass); } @@ -65,6 +69,12 @@ impl From for Item { tag: entity .unwrap_or("tag", "-".to_string()) .expect("tag is always present"), + supplier_code: entity + .unwrap("supplier_code") + .expect("supplier code is always present"), + supplier_rank: entity + .unwrap("supplier_rank") + .expect("supplier rank is always present"), } } }