From aa066ef5bb9ed043feafd0e87e219cb34cce35c5 Mon Sep 17 00:00:00 2001 From: Ilion Beyst Date: Tue, 23 Aug 2022 20:00:21 +0200 Subject: create maps table --- planetwars-server/src/routes/matches.rs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'planetwars-server/src/routes/matches.rs') diff --git a/planetwars-server/src/routes/matches.rs b/planetwars-server/src/routes/matches.rs index 44bdaf1..71c4409 100644 --- a/planetwars-server/src/routes/matches.rs +++ b/planetwars-server/src/routes/matches.rs @@ -79,11 +79,8 @@ pub async fn list_recent_matches( matches.truncate(requested_count); } - let api_matches = matches - .into_iter() - .map(match_data_to_api) - .collect(); - + let api_matches = matches.into_iter().map(match_data_to_api).collect(); + Ok(Json(ListMatchesResponse { matches: api_matches, has_next, -- cgit v1.2.3