File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -609,7 +609,9 @@ fn test_no_base_url() {
609
609
assert ! ( no_base_url. path_segments( ) . is_none( ) ) ;
610
610
assert ! ( no_base_url. path_segments_mut( ) . is_err( ) ) ;
611
611
assert ! ( no_base_url. set_host( Some ( "foo" ) ) . is_err( ) ) ;
612
- assert ! ( no_base_url. set_ip_host( "127.0.0.1" . parse( ) . unwrap( ) ) . is_err( ) ) ;
612
+ assert ! ( no_base_url
613
+ . set_ip_host( "127.0.0.1" . parse( ) . unwrap( ) )
614
+ . is_err( ) ) ;
613
615
614
616
no_base_url. set_path ( "/foo" ) ;
615
617
assert_eq ! ( no_base_url. path( ) , "%2Ffoo" ) ;
@@ -674,10 +676,10 @@ fn test_fragment() {
674
676
fn test_set_ip_host ( ) {
675
677
let mut url = Url :: parse ( "http://example.com" ) . unwrap ( ) ;
676
678
677
- url. set_ip_host ( "127.0.0.1" . parse ( ) . unwrap ( ) ) ;
679
+ url. set_ip_host ( "127.0.0.1" . parse ( ) . unwrap ( ) ) . unwrap ( ) ;
678
680
assert_eq ! ( url. host_str( ) , Some ( "127.0.0.1" ) ) ;
679
681
680
- url. set_ip_host ( "::1" . parse ( ) . unwrap ( ) ) ;
682
+ url. set_ip_host ( "::1" . parse ( ) . unwrap ( ) ) . unwrap ( ) ;
681
683
assert_eq ! ( url. host_str( ) , Some ( "[::1]" ) ) ;
682
684
}
683
685
You can’t perform that action at this time.
0 commit comments