Ver Fonte

Add a TODO list

Simon Sapin há 12 anos atrás
pai
commit
4091e1437a
2 ficheiros alterados com 21 adições e 2 exclusões
  1. 19 0
      README.md
  2. 2 2
      url.rs

+ 19 - 0
README.md

@@ -6,3 +6,22 @@ Rust implementation of the [URL Standard](http://url.spec.whatwg.org/).
 See [Rust bug #10707](https://github.com/mozilla/rust/issues/10707).
 
 This depends on [rust-encoding](https://github.com/lifthrasiir/rust-encoding).
+
+
+To do
+-----
+
+Not necessarily in the given order:
+
+* Bikeshed the API
+* Add `data:` URL parsing.
+* Port rust-http and Servo.
+* Add [IDNA support](http://url.spec.whatwg.org/#idna).
+  Non-ASCII domains are a parse error for now.
+  [Punycode](http://tools.ietf.org/html/rfc3492) is done,
+  [Nameprep](http://tools.ietf.org/html/rfc3491) is the other big part.
+* Add lots of tests.
+  Contribute them to [web-platform-tests](https://github.com/w3c/web-platform-tests/tree/master/url).
+* Report know/suspected spec bugs and test suite bugs.
+* Refactor to reduce code duplication.
+* Consider switching the spec from a state machine to functional style, like this code.

+ 2 - 2
url.rs

@@ -108,12 +108,12 @@ impl URL {
         result.push(':'.to_ascii());
         match self.scheme_data {
             RelativeSchemeData(SchemeRelativeURL {
-                userinfo: ref userinfo, host: ref host, port: ref port, path: ref path
+                ref userinfo, ref host, ref port, ref path
             }) => {
                 result.push_all("//".to_ascii());
                 match userinfo {
                     &None => (),
-                    &Some(UserInfo { username: ref username, password: ref password })
+                    &Some(UserInfo { ref username, ref password })
                     => if username.len() > 0 || password.is_some() {
                         result.push_all(username.as_slice());
                         match password {