From 1a871d708e70aabcad9a1f97a48642b41fca8732 Mon Sep 17 00:00:00 2001 From: Nikolay Kim Date: Sat, 30 Mar 2019 12:13:21 -0700 Subject: [PATCH] update guard doc test --- Cargo.toml | 2 +- src/guard.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index fb53008e..3abe3129 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -72,7 +72,7 @@ actix-router = "0.1.0" actix-rt = "0.2.2" actix-web-codegen = "0.1.0-alpha.1" actix-http = { version = "0.1.0-alpha.2", features=["fail"] } -actix-server = "0.4.1" +actix-server = "0.4.2" actix-server-config = "0.1.0" actix-threadpool = "0.1.0" awc = { version = "0.1.0-alpha.2", optional = true } diff --git a/src/guard.rs b/src/guard.rs index 4dcd7ba8..fa9088e2 100644 --- a/src/guard.rs +++ b/src/guard.rs @@ -19,7 +19,7 @@ //! App::new().service(web::resource("/index.html").route( //! web::route() //! .guard(guard::Post()) -//! .guard(|head: &dev::RequestHead| head.method == http::Method::GET) +//! .guard(guard::fn_guard(|head| head.method == http::Method::GET)) //! .to(|| HttpResponse::MethodNotAllowed())) //! ); //! }