File tree Expand file tree Collapse file tree 3 files changed +7
-21
lines changed Expand file tree Collapse file tree 3 files changed +7
-21
lines changed Original file line number Diff line number Diff line change @@ -591,20 +591,10 @@ mod tests {
591591 let as_vec = trailers. iter ( ) . collect :: < Vec < _ > > ( ) ;
592592
593593 assert_eq ! ( as_vec. len( ) , 1 ) ;
594- let ( header_name, header_values) = as_vec[ 0 ] ;
595- assert_eq ! (
596- header_name,
597- & "Expires"
598- . parse:: <http_types:: headers:: HeaderName >( )
599- . unwrap( )
600- ) ;
601- assert_eq ! ( header_values. iter( ) . collect:: <Vec <_>>( ) . len( ) , 1 ) ;
602- assert_eq ! (
603- header_values. last( ) ,
604- & "Wed, 21 Oct 2015 07:28:00 GMT"
605- . parse:: <http_types:: headers:: HeaderValue >( )
606- . unwrap( )
607- ) ;
594+ let ( trailer_name, trailer_values) = as_vec[ 0 ] ;
595+ assert_eq ! ( trailer_name, "Expires" ) ;
596+ assert_eq ! ( trailer_values. iter( ) . count( ) , 1 ) ;
597+ assert_eq ! ( trailer_values. last( ) , "Wed, 21 Oct 2015 07:28:00 GMT" ) ;
608598 } ) ;
609599 }
610600}
Original file line number Diff line number Diff line change @@ -5,10 +5,8 @@ use std::pin::Pin;
55use async_std:: io;
66use async_std:: io:: prelude:: * ;
77use async_std:: task:: { Context , Poll } ;
8- use http_types:: {
9- headers:: { CONTENT_LENGTH , DATE , TRANSFER_ENCODING } ,
10- Response ,
11- } ;
8+ use http_types:: headers:: { CONTENT_LENGTH , DATE , TRANSFER_ENCODING } ;
9+ use http_types:: Response ;
1210
1311use crate :: chunked:: ChunkedEncoder ;
1412use crate :: date:: fmt_http_date;
Original file line number Diff line number Diff line change @@ -57,9 +57,7 @@ async fn test_response_newlines() {
5757 let res = client:: decode ( response_fixture) . await . unwrap ( ) ;
5858
5959 pretty_assertions:: assert_eq!(
60- res. header( & headers:: CONTENT_LENGTH )
61- . unwrap( )
62- . last( )
60+ res[ headers:: CONTENT_LENGTH ]
6361 . as_str( )
6462 . parse:: <usize >( )
6563 . unwrap( ) ,
You can’t perform that action at this time.
0 commit comments