refactor(headers): remove marker from header_name method

It is no longer required, as we can use `<H as Header>::header_name()`.

BREAKING CHANGE: Implementations of Header will need to adjust the
    header_name method. It no longer takes any arguments.
This commit is contained in:
Sean McArthur
2015-01-22 15:20:38 -08:00
parent 65ed029d3e
commit 8215889eda
31 changed files with 38 additions and 38 deletions

View File

@@ -15,7 +15,7 @@ pub struct AccessControlAllowHeaders(pub Vec<String>);
impl header::Header for AccessControlAllowHeaders {
#[inline]
fn header_name(_: Option<AccessControlAllowHeaders>) -> &'static str {
fn header_name() -> &'static str {
"Access-Control-Allow-Headers"
}

View File

@@ -16,7 +16,7 @@ pub struct AccessControlAllowMethods(pub Vec<method::Method>);
impl header::Header for AccessControlAllowMethods {
#[inline]
fn header_name(_: Option<AccessControlAllowMethods>) -> &'static str {
fn header_name() -> &'static str {
"Access-Control-Allow-Methods"
}

View File

@@ -23,7 +23,7 @@ pub enum AccessControlAllowOrigin {
impl header::Header for AccessControlAllowOrigin {
#[inline]
fn header_name(_: Option<AccessControlAllowOrigin>) -> &'static str {
fn header_name() -> &'static str {
"Access-Control-Allow-Origin"
}

View File

@@ -14,7 +14,7 @@ pub struct AccessControlMaxAge(pub u32);
impl header::Header for AccessControlMaxAge {
#[inline]
fn header_name(_: Option<AccessControlMaxAge>) -> &'static str {
fn header_name() -> &'static str {
"Access-Control-Max-Age"
}

View File

@@ -14,7 +14,7 @@ pub struct AccessControlRequestHeaders(pub Vec<String>);
impl header::Header for AccessControlRequestHeaders {
#[inline]
fn header_name(_: Option<AccessControlRequestHeaders>) -> &'static str {
fn header_name() -> &'static str {
"Access-Control-Request-Headers"
}

View File

@@ -15,7 +15,7 @@ pub struct AccessControlRequestMethod(pub Method);
impl header::Header for AccessControlRequestMethod {
#[inline]
fn header_name(_: Option<AccessControlRequestMethod>) -> &'static str {
fn header_name() -> &'static str {
"Access-Control-Request-Method"
}