File tree Expand file tree Collapse file tree 3 files changed +4
-6
lines changed Expand file tree Collapse file tree 3 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ edition = "2018"
1515url = " 2.1.0"
1616httparse = " 1.3.3"
1717async-std = { version = " 1.5.0" , features = [" unstable" ] }
18- http-types = { git = " https://github.com/http-rs/http-types.git " , branch = " master " }
18+ http-types = " 2.0.0 "
1919pin-project-lite = " 0.1.1"
2020byte-pool = " 0.2.1"
2121lazy_static = " 1.4.0"
Original file line number Diff line number Diff line change 6262
6363 let mut res = Response :: new ( StatusCode :: try_from ( code) ?) ;
6464 for header in httparse_res. headers . iter ( ) {
65- res. append_header ( header. name , std:: str:: from_utf8 ( header. value ) ?) ? ;
65+ res. append_header ( header. name , std:: str:: from_utf8 ( header. value ) ?) ;
6666 }
6767
6868 if res. header ( DATE ) . is_none ( ) {
Original file line number Diff line number Diff line change @@ -158,7 +158,7 @@ mod tests {
158158 #[ test]
159159 fn handle_100_continue_sends_header_if_expects_is_exactly_right ( ) {
160160 let mut request = Request :: new ( Method :: Get , url:: Url :: parse ( "x:" ) . unwrap ( ) ) ;
161- request. append_header ( "expect" , "100-continue" ) . unwrap ( ) ;
161+ request. append_header ( "expect" , "100-continue" ) ;
162162 let mut io = async_std:: io:: Cursor :: new ( vec ! [ ] ) ;
163163 let result = async_std:: task:: block_on ( handle_100_continue ( & request, & mut io) ) ;
164164 assert_eq ! (
@@ -171,9 +171,7 @@ mod tests {
171171 #[ test]
172172 fn handle_100_continue_does_nothing_if_expects_header_is_wrong ( ) {
173173 let mut request = Request :: new ( Method :: Get , url:: Url :: parse ( "x:" ) . unwrap ( ) ) ;
174- request
175- . append_header ( "expect" , "110-extensions-not-allowed" )
176- . unwrap ( ) ;
174+ request. append_header ( "expect" , "110-extensions-not-allowed" ) ;
177175 let mut io = async_std:: io:: Cursor :: new ( vec ! [ ] ) ;
178176 let result = async_std:: task:: block_on ( handle_100_continue ( & request, & mut io) ) ;
179177 assert_eq ! ( std:: str :: from_utf8( & io. into_inner( ) ) . unwrap( ) , "" ) ;
You can’t perform that action at this time.
0 commit comments