From 9ac8cb12490aac28cc7aeea9c38afcac9cc64845 Mon Sep 17 00:00:00 2001 From: davidemazzocchi Date: Sun, 19 Oct 2025 07:50:47 +0200 Subject: [PATCH] chore: run cargo format --- 01.workspace/heave/src/str/catalog.rs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/01.workspace/heave/src/str/catalog.rs b/01.workspace/heave/src/str/catalog.rs index 854311d..1bafa9b 100644 --- a/01.workspace/heave/src/str/catalog.rs +++ b/01.workspace/heave/src/str/catalog.rs @@ -1051,7 +1051,10 @@ mod tests { Some(&Value::from("Test Item")) ); assert_eq!(loaded_entity.value_of("price"), Some(&Value::from(123u64))); - assert_eq!(loaded_entity.value_of("sell_trend"), Some(&Value::from(0i64))); + assert_eq!( + loaded_entity.value_of("sell_trend"), + Some(&Value::from(0i64)) + ); assert_eq!(loaded_entity.value_of("in_stock"), Some(&Value::from(true))); assert_eq!(loaded_entity.state, EntityState::Loaded); // Should be Synced after loading. // 6. Also verify by using the public 'get' method. @@ -1754,8 +1757,11 @@ mod tests { catalog_verify.load_by_id("item-1").unwrap(); let final_item: Item = catalog_verify.get("item-1").unwrap().unwrap(); // The final state depends on which thread persisted last. One update will have been lost. - let thread1_won = final_item.name == "Updated by Thread 1" && final_item.price == 100 && final_item.sell_trend == 0; - let thread2_won = final_item.name == "Original" && final_item.price == 200 && final_item.sell_trend == 0; + let thread1_won = final_item.name == "Updated by Thread 1" + && final_item.price == 100 + && final_item.sell_trend == 0; + let thread2_won = + final_item.name == "Original" && final_item.price == 200 && final_item.sell_trend == 0; assert!( thread1_won || thread2_won, "Final state must be the result of one of the threads winning the race."