File tree 2 files changed +15
-2
lines changed
2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -57,7 +57,13 @@ pub fn internal_components(url: &Url) -> InternalComponents {
57
57
}
58
58
}
59
59
60
- /// https://url.spec.whatwg.org/#dom-url-domaintoascii
60
+ /// Converts a domain name to its ASCII (punycode) form.
61
+ ///
62
+ /// This feature was never implemented by browsers, and
63
+ /// [has been removed from the URL spec][0].
64
+ ///
65
+ /// [0]: https://github.com/whatwg/url/issues/63
66
+ #[ deprecated]
61
67
pub fn domain_to_ascii ( domain : & str ) -> String {
62
68
match Host :: parse ( domain) {
63
69
Ok ( Host :: Domain ( domain) ) => domain,
@@ -66,9 +72,15 @@ pub fn domain_to_ascii(domain: &str) -> String {
66
72
}
67
73
68
74
#[ cfg( not( all( target_arch = "wasm32" , target_os = "unknown" ) ) ) ]
69
- /// <https://url.spec.whatwg.org/#dom-url-domaintounicode>
75
+ #[ deprecated]
76
+ /// Converts a domain name to its Unicode form.
77
+ ///
78
+ /// This feature was never implemented by browsers, and
79
+ /// [has been removed from the URL spec][0].
70
80
///
71
81
/// This feature is not available on `wasm32-unknown-unknown` targets.
82
+ ///
83
+ /// [0]: https://github.com/whatwg/url/issues/63
72
84
pub fn domain_to_unicode ( domain : & str ) -> String {
73
85
match Host :: parse ( domain) {
74
86
Ok ( Host :: Domain ( ref domain) ) => {
Original file line number Diff line number Diff line change @@ -771,6 +771,7 @@ fn test_set_href() {
771
771
}
772
772
773
773
#[ test]
774
+ #[ allow( deprecated) ]
774
775
fn test_domain_encoding_quirks ( ) {
775
776
use url:: quirks:: domain_to_ascii;
776
777
#[ cfg( not( all( target_arch = "wasm32" , target_os = "unknown" ) ) ) ]
You can’t perform that action at this time.
0 commit comments