From d2bfb445d375026499f2b8e4b6d588cf95e9534c Mon Sep 17 00:00:00 2001 From: "Aode (lion)" Date: Thu, 30 Dec 2021 21:23:50 -0600 Subject: [PATCH] Name handler return type --- src/main.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main.rs b/src/main.rs index ad367a6..b441d97 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,5 +1,5 @@ use actix_web::web::{Data, Json}; -use actix_web::{App, HttpResponse, HttpServer, Responder}; +use actix_web::{App, HttpResponse, HttpServer}; use std::collections::HashMap; use std::sync::{Arc, Mutex}; use std::time::Duration; @@ -220,7 +220,7 @@ impl Drop for GameDropper { } } -async fn start(start: Json, game_state: Data) -> impl Responder { +async fn start(start: Json, game_state: Data) -> HttpResponse { let game_id = GameId::new(); let (tx, mut rx) = tokio::sync::mpsc::channel(1); @@ -258,7 +258,7 @@ async fn start(start: Json, game_state: Data) -> impl Responde }) } -async fn make_move(action: Json, game_state: Data) -> impl Responder { +async fn make_move(action: Json, game_state: Data) -> HttpResponse { if let Some(data) = game_state.data_for_id(&action.0.game_id) { let (tx, rx) = tokio::sync::oneshot::channel();