diff --git a/src/pred.rs b/src/pred.rs index 5d47922f..3b7b99c4 100644 --- a/src/pred.rs +++ b/src/pred.rs @@ -68,7 +68,7 @@ impl Predicate for AnyPredicate { /// r.route() /// .filter( /// pred::All(pred::Get()) -/// .and(pred::Header("content-type", "plain/text")), +/// .and(pred::Header("content-type", "text/plain")), /// ) /// .f(|_| HttpResponse::MethodNotAllowed()) /// }); @@ -177,7 +177,8 @@ pub fn Method(method: http::Method) -> MethodPredicate { /// Return predicate that matches if request contains specified header and /// value. pub fn Header( - name: &'static str, value: &'static str, + name: &'static str, + value: &'static str, ) -> HeaderPredicate { HeaderPredicate( header::HeaderName::try_from(name).unwrap(),