1
0
Fork 0
mirror of https://github.com/actix/actix-web.git synced 2024-12-29 19:40:34 +00:00

Fix actix-http examples (#1259)

Fix actix-http examples
This commit is contained in:
linkmauve 2020-01-06 16:15:04 +01:00 committed by Yuki Okushi
parent 2803fcbe22
commit f5fd6bc49f
3 changed files with 9 additions and 3 deletions

View file

@ -7,7 +7,8 @@ use futures::StreamExt;
use http::header::HeaderValue;
use log::info;
fn main() -> io::Result<()> {
#[actix_rt::main]
async fn main() -> io::Result<()> {
env::set_var("RUST_LOG", "echo=info");
env_logger::init();
@ -37,4 +38,5 @@ fn main() -> io::Result<()> {
.tcp()
})?
.run()
.await
}

View file

@ -19,7 +19,8 @@ async fn handle_request(mut req: Request) -> Result<Response, Error> {
.body(body))
}
fn main() -> io::Result<()> {
#[actix_rt::main]
async fn main() -> io::Result<()> {
env::set_var("RUST_LOG", "echo=info");
env_logger::init();
@ -28,4 +29,5 @@ fn main() -> io::Result<()> {
HttpService::build().finish(handle_request).tcp()
})?
.run()
.await
}

View file

@ -6,7 +6,8 @@ use futures::future;
use http::header::HeaderValue;
use log::info;
fn main() -> io::Result<()> {
#[actix_rt::main]
async fn main() -> io::Result<()> {
env::set_var("RUST_LOG", "hello_world=info");
env_logger::init();
@ -24,4 +25,5 @@ fn main() -> io::Result<()> {
.tcp()
})?
.run()
.await
}