File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -85,25 +85,25 @@ impl Display for HeaderValues {
85
85
86
86
impl PartialEq < str > for HeaderValues {
87
87
fn eq ( & self , other : & str ) -> bool {
88
- self . inner [ 0 ] == other
88
+ self . inner . len ( ) == 1 && self . inner [ 0 ] == other
89
89
}
90
90
}
91
91
92
92
impl < ' a > PartialEq < & ' a str > for HeaderValues {
93
93
fn eq ( & self , other : & & ' a str ) -> bool {
94
- & self . inner [ 0 ] == other
94
+ self . inner . len ( ) == 1 && & self . inner [ 0 ] == other
95
95
}
96
96
}
97
97
98
98
impl PartialEq < String > for HeaderValues {
99
99
fn eq ( & self , other : & String ) -> bool {
100
- & self . inner [ 0 ] == other
100
+ self . inner . len ( ) == 1 && & self . inner [ 0 ] == other
101
101
}
102
102
}
103
103
104
104
impl < ' a > PartialEq < & String > for HeaderValues {
105
105
fn eq ( & self , other : & & String ) -> bool {
106
- & & self . inner [ 0 ] == other
106
+ self . inner . len ( ) == 1 && & & self . inner [ 0 ] == other
107
107
}
108
108
}
109
109
You can’t perform that action at this time.
0 commit comments