1
0
mirror of https://github.com/actix/examples synced 2025-06-27 01:27:43 +02:00

resolved formatting

This commit is contained in:
dowwie
2020-01-31 07:21:39 -05:00
parent da72aef69c
commit 04cebf6899
4 changed files with 19 additions and 23 deletions

View File

@ -1,9 +1,8 @@
use std::{sync::mpsc, thread};
use actix_web::{get, middleware, post, web, App, HttpResponse, HttpServer};
use futures::executor;
use std::{sync::mpsc, thread};
use tokio::signal::unix::{signal, SignalKind};
#[get("/hello")]
async fn hello() -> &'static str {
"Hello world!"
@ -59,7 +58,7 @@ async fn main() -> std::io::Result<()> {
println!("\n*** SIGINT received. Stopping server, gracefully. ***\n");
stopper.send(()).unwrap();
}
});
});
// run server
server.await