From 55534bff8c4591f40e11ccecbafa430d4fd1cc6d Mon Sep 17 00:00:00 2001 From: Nikolay Kim Date: Wed, 20 Dec 2017 23:21:26 -0800 Subject: [PATCH] simplify guide examples --- guide/src/qs_3_5.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/guide/src/qs_3_5.md b/guide/src/qs_3_5.md index dfde017dc..647aa9654 100644 --- a/guide/src/qs_3_5.md +++ b/guide/src/qs_3_5.md @@ -20,7 +20,7 @@ fn main() { HttpServer::new( || Application::new() - .resource("/", |r| r.f(|_| httpcodes::HTTPOk))) + .resource("/", |r| r.h(httpcodes::HTTPOk))) .bind("127.0.0.1:59080").unwrap() .start(); @@ -46,7 +46,7 @@ use actix_web::*; fn main() { HttpServer::::new( || Application::new() - .resource("/", |r| r.f(|_| httpcodes::HTTPOk))) + .resource("/", |r| r.h(httpcodes::HTTPOk))) .threads(4); // <- Start 4 workers } ``` @@ -109,7 +109,7 @@ use actix_web::*; fn main() { HttpServer::::new(|| Application::new() - .resource("/", |r| r.f(|r| httpcodes::HTTPOk))) + .resource("/", |r| r.h(httpcodes::HTTPOk))) .keep_alive(None); // <- Use `SO_KEEPALIVE` socket option. } ```