1
0
mirror of https://github.com/actix/actix-extras.git synced 2024-11-28 09:42:40 +01:00

plain/text -> text/plain in comment (#362)

This commit is contained in:
Gorm Casper 2018-07-04 10:17:44 +02:00 committed by Douman
parent b6d26c9faf
commit 09aabc7b3b

View File

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