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:
@@ -34,7 +34,7 @@ fn handle(_r: Request, res: Response) {
|
||||
struct Foo;
|
||||
|
||||
impl hyper::header::Header for Foo {
|
||||
fn header_name(_: Option<Foo>) -> &'static str {
|
||||
fn header_name() -> &'static str {
|
||||
"x-foo"
|
||||
}
|
||||
fn parse_header(_: &[Vec<u8>]) -> Option<Foo> {
|
||||
|
||||
@@ -50,7 +50,7 @@ impl Writer for MockStream {
|
||||
struct Foo;
|
||||
|
||||
impl hyper::header::Header for Foo {
|
||||
fn header_name(_: Option<Foo>) -> &'static str {
|
||||
fn header_name() -> &'static str {
|
||||
"x-foo"
|
||||
}
|
||||
fn parse_header(_: &[Vec<u8>]) -> Option<Foo> {
|
||||
|
||||
Reference in New Issue
Block a user