File tree 3 files changed +4
-6
lines changed
3 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ edition = "2018"
15
15
url = " 2.1.0"
16
16
httparse = " 1.3.3"
17
17
async-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 "
19
19
pin-project-lite = " 0.1.1"
20
20
byte-pool = " 0.2.1"
21
21
lazy_static = " 1.4.0"
Original file line number Diff line number Diff line change 62
62
63
63
let mut res = Response :: new ( StatusCode :: try_from ( code) ?) ;
64
64
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 ) ?) ;
66
66
}
67
67
68
68
if res. header ( DATE ) . is_none ( ) {
Original file line number Diff line number Diff line change @@ -158,7 +158,7 @@ mod tests {
158
158
#[ test]
159
159
fn handle_100_continue_sends_header_if_expects_is_exactly_right ( ) {
160
160
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" ) ;
162
162
let mut io = async_std:: io:: Cursor :: new ( vec ! [ ] ) ;
163
163
let result = async_std:: task:: block_on ( handle_100_continue ( & request, & mut io) ) ;
164
164
assert_eq ! (
@@ -171,9 +171,7 @@ mod tests {
171
171
#[ test]
172
172
fn handle_100_continue_does_nothing_if_expects_header_is_wrong ( ) {
173
173
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" ) ;
177
175
let mut io = async_std:: io:: Cursor :: new ( vec ! [ ] ) ;
178
176
let result = async_std:: task:: block_on ( handle_100_continue ( & request, & mut io) ) ;
179
177
assert_eq ! ( std:: str :: from_utf8( & io. into_inner( ) ) . unwrap( ) , "" ) ;
You can’t perform that action at this time.
0 commit comments