style(fifa17): cargo fmt match wire + host match integration

This commit is contained in:
funman300
2026-08-20 17:59:03 +00:00
parent 56bd9ddc85
commit afa5f620bd
4 changed files with 17 additions and 8 deletions
+4 -1
View File
@@ -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);
+5 -4
View File
@@ -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"),
}
}
@@ -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");
@@ -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,