From 7596d0b7cbf4558355b7fe79a2a8e5b9d9015f34 Mon Sep 17 00:00:00 2001 From: Nikolay Kim Date: Sat, 30 Mar 2019 20:48:00 -0700 Subject: [PATCH] fix fn_guard doc string --- src/guard.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/guard.rs b/src/guard.rs index fa9088e2..44e4891e 100644 --- a/src/guard.rs +++ b/src/guard.rs @@ -39,7 +39,7 @@ pub trait Guard { fn check(&self, request: &RequestHead) -> bool; } -/// Return guard that matches if all of the supplied guards. +/// Create guard object for supplied function. /// /// ```rust /// use actix_web::{guard, web, App, HttpResponse}; @@ -48,7 +48,9 @@ pub trait Guard { /// App::new().service(web::resource("/index.html").route( /// web::route() /// .guard( -/// guard::fn_guard(|req| req.headers().contains_key("content-type"))) +/// guard::fn_guard( +/// |req| req.headers() +/// .contains_key("content-type"))) /// .to(|| HttpResponse::MethodNotAllowed())) /// ); /// }