Name handler return type
This commit is contained in:
parent
2ad35f1f1c
commit
d2bfb445d3
1 changed files with 3 additions and 3 deletions
|
@ -1,5 +1,5 @@
|
||||||
use actix_web::web::{Data, Json};
|
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::collections::HashMap;
|
||||||
use std::sync::{Arc, Mutex};
|
use std::sync::{Arc, Mutex};
|
||||||
use std::time::Duration;
|
use std::time::Duration;
|
||||||
|
@ -220,7 +220,7 @@ impl Drop for GameDropper {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async fn start(start: Json<Start>, game_state: Data<GameState>) -> impl Responder {
|
async fn start(start: Json<Start>, game_state: Data<GameState>) -> HttpResponse {
|
||||||
let game_id = GameId::new();
|
let game_id = GameId::new();
|
||||||
|
|
||||||
let (tx, mut rx) = tokio::sync::mpsc::channel(1);
|
let (tx, mut rx) = tokio::sync::mpsc::channel(1);
|
||||||
|
@ -258,7 +258,7 @@ async fn start(start: Json<Start>, game_state: Data<GameState>) -> impl Responde
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
async fn make_move(action: Json<Move>, game_state: Data<GameState>) -> impl Responder {
|
async fn make_move(action: Json<Move>, game_state: Data<GameState>) -> HttpResponse {
|
||||||
if let Some(data) = game_state.data_for_id(&action.0.game_id) {
|
if let Some(data) = game_state.data_for_id(&action.0.game_id) {
|
||||||
let (tx, rx) = tokio::sync::oneshot::channel();
|
let (tx, rx) = tokio::sync::oneshot::channel();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue