@@ -78,7 +78,7 @@ fn is_modified_since(modified_since: Tm, res: &Response<Body>) -> bool {
78
78
}
79
79
}
80
80
81
- fn get_and_concat_header < ' a > ( headers : & ' a HeaderMap , name : header:: HeaderName ) -> Cow < ' a , [ u8 ] > {
81
+ fn get_and_concat_header ( headers : & HeaderMap , name : header:: HeaderName ) -> Cow < ' _ , [ u8 ] > {
82
82
let mut values = headers. get_all ( name) . iter ( ) ;
83
83
if values. size_hint ( ) == ( 1 , Some ( 1 ) ) {
84
84
// Exactly 1 value, allocation is unnecessary
@@ -241,7 +241,7 @@ mod tests {
241
241
fn expect_304 ( response : HandlerResult ) {
242
242
let response = response. expect ( "No response" ) ;
243
243
assert_eq ! ( response. status( ) , StatusCode :: NOT_MODIFIED ) ;
244
- assert_eq ! ( response. into_cow( ) , "" . as_bytes ( ) ) ;
244
+ assert_eq ! ( * response. into_cow( ) , b"" [ .. ] ) ;
245
245
}
246
246
247
247
fn expect_200 ( response : HandlerResult ) {
@@ -251,7 +251,7 @@ mod tests {
251
251
fn expect ( status : StatusCode , response : HandlerResult ) {
252
252
let response = response. expect ( "No response" ) ;
253
253
assert_eq ! ( response. status( ) , status) ;
254
- assert_eq ! ( response. into_cow( ) , "hello" . as_bytes ( ) ) ;
254
+ assert_eq ! ( * response. into_cow( ) , b "hello"[ .. ] ) ;
255
255
}
256
256
257
257
struct SimpleHandler {
0 commit comments