File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -3532,7 +3532,7 @@ fn test_bounds() {
3532
3532
#[ test]
3533
3533
fn skip_duplicates_during_key_iteration ( ) {
3534
3534
let mut map = HeaderMap :: new ( ) ;
3535
- map. append ( "a" , HeaderValue :: from_static ( "a" ) ) ;
3536
- map. append ( "a" , HeaderValue :: from_static ( "b" ) ) ;
3535
+ map. try_append ( "a" , HeaderValue :: from_static ( "a" ) ) . unwrap ( ) ;
3536
+ map. try_append ( "a" , HeaderValue :: from_static ( "b" ) ) . unwrap ( ) ;
3537
3537
assert_eq ! ( map. keys( ) . count( ) , map. keys_len( ) ) ;
3538
3538
}
Original file line number Diff line number Diff line change @@ -488,11 +488,11 @@ mod from_header_name_tests {
488
488
#[ test]
489
489
fn it_can_insert_header_name_as_header_value ( ) {
490
490
let mut map = HeaderMap :: new ( ) ;
491
- map. insert ( name:: UPGRADE , name:: SEC_WEBSOCKET_PROTOCOL . into ( ) ) ;
492
- map. insert (
491
+ map. try_insert ( name:: UPGRADE , name:: SEC_WEBSOCKET_PROTOCOL . into ( ) ) . unwrap ( ) ;
492
+ map. try_insert (
493
493
name:: ACCEPT ,
494
494
name:: HeaderName :: from_bytes ( b"hello-world" ) . unwrap ( ) . into ( ) ,
495
- ) ;
495
+ ) . unwrap ( ) ;
496
496
497
497
assert_eq ! (
498
498
map. get( name:: UPGRADE ) . unwrap( ) ,
You can’t perform that action at this time.
0 commit comments