diff --git a/openfut-import-fifa17/src/lib.rs b/openfut-import-fifa17/src/lib.rs index f4ec8e1..035093b 100644 --- a/openfut-import-fifa17/src/lib.rs +++ b/openfut-import-fifa17/src/lib.rs @@ -1312,15 +1312,16 @@ pub fn emit_content( // cannot derive the right kind (it is FIFA17 taxonomy), so hand it the // mapping. Players are included too: a definition that was mis-set stays // correctable, and a rerun changes nothing. - let assignments: Vec = report - .definitions - .supported - .iter() - .map(|d| serde_json::json!({ "card_id": d.card_id, "content_kind": "player" })) - .chain(report.non_player.supported.iter().map(|d| { - serde_json::json!({ "card_id": d.card_id, "content_kind": d.kind.as_str() }) - })) - .collect(); + let assignments: Vec = + report + .definitions + .supported + .iter() + .map(|d| serde_json::json!({ "card_id": d.card_id, "content_kind": "player" })) + .chain(report.non_player.supported.iter().map( + |d| serde_json::json!({ "card_id": d.card_id, "content_kind": d.kind.as_str() }), + )) + .collect(); let reclassify = content_dir.join("fifa17-reclassify.json"); write_json_pretty( &reclassify, diff --git a/openfut-import-fifa17/src/tests.rs b/openfut-import-fifa17/src/tests.rs index 7b2e6e5..1dc64ea 100644 --- a/openfut-import-fifa17/src/tests.rs +++ b/openfut-import-fifa17/src/tests.rs @@ -775,10 +775,7 @@ fn club_item_missing_render_metadata_defers() { let plan = plan_non_player_definitions(&profile(&[item], "[]", 100000600)); assert!(plan.supported.is_empty()); assert_eq!(plan.deferred.len(), 1); - assert_eq!( - plan.deferred[0].reason, - "missing_club_item_render_metadata" - ); + assert_eq!(plan.deferred[0].reason, "missing_club_item_render_metadata"); // Correct kit art, but no team: the kit identity resolver keys on teamid. let item = r#"{"id":100000502,"resourceId":6300007,"assetId":6300007, @@ -794,10 +791,7 @@ fn club_item_missing_render_metadata_defers() { .to_string(); let plan = plan_non_player_definitions(&profile(&[item], "[]", 100000600)); assert!(plan.supported.is_empty()); - assert_eq!( - plan.deferred[0].reason, - "missing_club_item_render_metadata" - ); + assert_eq!(plan.deferred[0].reason, "missing_club_item_render_metadata"); } /// Club items are settled by `cardsubtypeid`, not by the id range they occupy. @@ -820,7 +814,10 @@ fn every_club_family_classifies_and_imports() { club(100000505, 8_010_001, 31, 40), // league logo ]; let counts = count_items(&profile(&items, "[]", 100000600)); - assert_eq!(counts.club_items, 5, "no club family falls through to Other"); + assert_eq!( + counts.club_items, 5, + "no club family falls through to Other" + ); assert_eq!(counts.other, 0); let plan = plan_non_player_definitions(&profile(&items, "[]", 100000600));