GitHub PullRequestReviewCommentEvent at 2014-03-16 23:21:38
Repository: rust
Actor: alexcrichton
Payload: {"comment":{"url":"https://api.github.com/repos/mozilla/rust/pulls/comments/10642561","id":10642561,"diff_hunk":"@@ -19,7 +19,35 @@ use std::iter::{Enumerate, FilterMap, Rev};\n use std::mem::replace;\n use std::vec;\n \n-#[allow(missing_doc)]\n+/// A map implementation designed for use with small unsigned integer keys.\n+///\n+/// Underneath, it's backed by a simple continuous vector where a key-value pair\n+/// with the key `n` is stored in the n-th element of the vector.\n+/// Therefore, its memory usage is proportional to the maximum value of all the\n+/// keys in the map.\n+///\n+/// # Example\n+///\n+/// ```rust\n+/// use collections::SmallIntMap;\n+///\n+/// let birthdates = SmallIntMap::new::<~str>();\n+///\n+/// // Add some key-value pairs.\n+/// birthdates.insert(1987, ~\"John\");\n+/// birthdates.insert(1955, ~\"Alice\");\n+/// birthdates.insert(1990, ~\"Anna\");\n+///\n+/// // Find a single element.\n+/// match birthdates.get(1955)) {\n+///     Some(v) => println!(\"{:}\", v);\n+///     None => println!(\"Not found.\");\n+///","path":"src/libcollections/smallintmap.rs","position":28,"original_position":28,"commit_id":"15b1dfc53655fb8e69e3a4004b51367f759ca560","original_commit_id":"15b1dfc53655fb8e69e3a4004b51367f759ca560","user":{"login":"alexcrichton","id":64996,"avatar_url":"https://gravatar.com/avatar/477e2098d9864b482d28e5ef8e657f43?d=https%3A%2F%2Fidenticons.github.com%2F621df6a7a3377f22b1ae3afc962c3f68.png&r=x","gravatar_id":"477e2098d9864b482d28e5ef8e657f43","url":"https://api.github.com/users/alexcrichton","html_url":"https://github.com/alexcrichton","followers_url":"https://api.github.com/users/alexcrichton/followers","following_url":"https://api.github.com/users/alexcrichton/following{/other_user}","gists_url":"https://api.github.com/users/alexcrichton/gists{/gist_id}","starred_url":"https://api.github.com/users/alexcrichton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexcrichton/subscriptions","organizations_url":"https://api.github.com/users/alexcrichton/orgs","repos_url":"https://api.github.com/users/alexcrichton/repos","events_url":"https://api.github.com/users/alexcrichton/events{/privacy}","received_events_url":"https://api.github.com/users/alexcrichton/received_events","type":"User","site_admin":false},"body":"The syntax here seems to have gone awry, I think the `match` block is missing the closing `}` and there's an extra `)` in the match clause.\r\n\r\nAdditionally, `{:}` is equivalent to `{}`, so feel free to leave out the colon.","created_at":"2014-03-16T23:21:38Z","updated_at":"2014-03-16T23:21:38Z","html_url":"https://github.com/mozilla/rust/pull/12953#discussion_r10642561","pull_request_url":"https://api.github.com/repos/mozilla/rust/pulls/12953","_links":{"self":{"href":"https://api.github.com/repos/mozilla/rust/pulls/comments/10642561"},"html":{"href":"https://github.com/mozilla/rust/pull/12953#discussion_r10642561"},"pull_request":{"href":"https://api.github.com/repos/mozilla/rust/pulls/12953"}}}}