From ae57359353cf31ff374a8932999742920878bf00 Mon Sep 17 00:00:00 2001 From: Ilion Beyst Date: Wed, 12 Oct 2022 22:52:15 +0200 Subject: upgrade to diesel 2.0 --- planetwars-server/src/routes/maps.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'planetwars-server/src/routes/maps.rs') diff --git a/planetwars-server/src/routes/maps.rs b/planetwars-server/src/routes/maps.rs index 689b11e..188089f 100644 --- a/planetwars-server/src/routes/maps.rs +++ b/planetwars-server/src/routes/maps.rs @@ -8,8 +8,8 @@ pub struct ApiMap { pub name: String, } -pub async fn list_maps(conn: DatabaseConnection) -> Result>, StatusCode> { - let maps = db::maps::list_maps(&conn).map_err(|_| StatusCode::INTERNAL_SERVER_ERROR)?; +pub async fn list_maps(mut conn: DatabaseConnection) -> Result>, StatusCode> { + let maps = db::maps::list_maps(&mut conn).map_err(|_| StatusCode::INTERNAL_SERVER_ERROR)?; let api_maps = maps .into_iter() -- cgit v1.2.3