From afa5f620bd66dc8fe21f5f519c0146ebcdf4be6c Mon Sep 17 00:00:00 2001 From: funman300 Date: Thu, 20 Aug 2026 17:59:03 +0000 Subject: [PATCH] style(fifa17): cargo fmt match wire + host match integration --- openfut-adapter-fifa17/src/fut/match_wire.rs | 5 ++++- openfut-utas-host/src/lib.rs | 9 +++++---- openfut-utas-host/tests/economy_concurrency.rs | 6 ++++-- openfut-utas-host/tests/economy_integration.rs | 5 ++++- 4 files changed, 17 insertions(+), 8 deletions(-) diff --git a/openfut-adapter-fifa17/src/fut/match_wire.rs b/openfut-adapter-fifa17/src/fut/match_wire.rs index c04abf6..ed876ed 100644 --- a/openfut-adapter-fifa17/src/fut/match_wire.rs +++ b/openfut-adapter-fifa17/src/fut/match_wire.rs @@ -168,7 +168,10 @@ mod tests { assert_eq!(result_from_end_reason(Some("LOSS")), MatchResult::Loss); assert_eq!(result_from_end_reason(Some("DNF")), MatchResult::Dnf); assert_eq!(result_from_end_reason(Some("QUIT")), MatchResult::Dnf); - assert_eq!(result_from_end_reason(Some("NO_CONTEST")), MatchResult::NoContest); + assert_eq!( + result_from_end_reason(Some("NO_CONTEST")), + MatchResult::NoContest + ); assert_eq!(result_from_end_reason(Some("DNF_WIN")), MatchResult::Win); assert_eq!(result_from_end_reason(Some("DNF_DRAW")), MatchResult::Draw); assert_eq!(result_from_end_reason(Some("DNF_LOSS")), MatchResult::Loss); diff --git a/openfut-utas-host/src/lib.rs b/openfut-utas-host/src/lib.rs index 0336747..e9a5355 100644 --- a/openfut-utas-host/src/lib.rs +++ b/openfut-utas-host/src/lib.rs @@ -55,8 +55,8 @@ use openfut_adapter_fifa17::fut::club_response::{ }; use openfut_adapter_fifa17::fut::club_stats::{club_stats_body, ClubStatInput, ContextField}; use openfut_adapter_fifa17::fut::content_taxonomy::ContentKind; -use openfut_adapter_fifa17::fut::match_wire; use openfut_adapter_fifa17::fut::entities::{Fifa17Entities, ReverseEntityResolver}; +use openfut_adapter_fifa17::fut::match_wire; use openfut_adapter_fifa17::fut::non_economy; use openfut_adapter_fifa17::fut::owned_query::{ is_special_rareflag, map_to_core, parse_club_query, MapError, @@ -2467,9 +2467,10 @@ pub fn handle_match_end(econ: &dyn CoreEconomy, persona: i64, body: &[u8]) -> Wi mode: "seasons", }; match econ.complete_match(&completion) { - Ok(receipt) => { - json_response(&match_wire::reward_response(receipt.coins_balance, receipt.coins_awarded)) - } + Ok(receipt) => json_response(&match_wire::reward_response( + receipt.coins_balance, + receipt.coins_awarded, + )), Err(_) => error_response(503, "core_unavailable"), } } diff --git a/openfut-utas-host/tests/economy_concurrency.rs b/openfut-utas-host/tests/economy_concurrency.rs index 07c9c96..06be422 100644 --- a/openfut-utas-host/tests/economy_concurrency.rs +++ b/openfut-utas-host/tests/economy_concurrency.rs @@ -436,8 +436,10 @@ fn case_d_two_market_buyers(h: &Harness) -> String { "POST", "/ut/game/fifa17/auctionhouse", &[], - format!(r#"{{"itemData":{{"id":{item_id}}},"buyNowPrice":1000,"startingBid":500}}"#) - .as_bytes(), + format!( + r#"{{"itemData":{{"id":{item_id}}},"buyNowPrice":1000,"startingBid":500}}"# + ) + .as_bytes(), None, ) .expect("list routed"); diff --git a/openfut-utas-host/tests/economy_integration.rs b/openfut-utas-host/tests/economy_integration.rs index fa31906..2e5ec90 100644 --- a/openfut-utas-host/tests/economy_integration.rs +++ b/openfut-utas-host/tests/economy_integration.rs @@ -165,7 +165,10 @@ fn seed_and_exercise(base: &str) -> i64 { let mb: Value = serde_json::from_slice(&m.body).unwrap(); assert_eq!(mb["matchCoins"], 400, "flat match coins"); let after_match = client.balance().unwrap(); - assert!(after_match >= before_match + 400, "match credited at least +400"); + assert!( + after_match >= before_match + 400, + "match credited at least +400" + ); assert_eq!( mb["allCoins"].as_i64().unwrap(), after_match,