diff --git a/src/pred.rs b/src/pred.rs index ebc48c34..432150ef 100644 --- a/src/pred.rs +++ b/src/pred.rs @@ -66,7 +66,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()) /// }); @@ -175,7 +175,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(),