GitHub PullRequestReviewCommentEvent at 2014-11-29 06:23:41
Repository: rust
Actor: huonw
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/rust-lang/rust/pulls/comments/21048830","id":21048830,"diff_hunk":"@@ -1051,45 +1124,47 @@ impl cmp::PartialEq for BitvSet {\n impl cmp::Eq for BitvSet {}\n \n impl BitvSet {\n-    /// Creates a new bit vector set with initially no contents.\n+    /// Creates a new empty `BitvSet`.\n     ///\n     /// # Example\n     ///\n     /// ```\n     /// use std::collections::BitvSet;\n+    ///\n     /// let mut s = BitvSet::new();\n     /// ```\n     #[inline]\n     #[unstable = \"matches collection reform specification, waiting for dust to settle\"]\n     pub fn new() -> BitvSet {\n-        BitvSet(Bitv::new())\n+        BitvSet { bitv: Bitv::new() }\n     }\n \n-    /// Creates a new bit vector set with initially no contents, able to\n+    /// Creates a new `BitvSet` with initially no contents, able to\n     /// hold `nbits` elements without resizing.\n     ///\n     /// # Example\n     ///\n     /// ```\n     /// use std::collections::BitvSet;\n+    ///\n     /// let mut s = BitvSet::with_capacity(100);\n     /// assert!(s.capacity() >= 100);\n     /// ```\n     #[inline]\n     #[unstable = \"matches collection reform specification, waiting for dust to settle\"]\n     pub fn with_capacity(nbits: uint) -> BitvSet {\n-        let bitv = Bitv::with_capacity(nbits, false);\n+        let bitv = Bitv::from_elem(nbits, false);","path":"src/libcollections/bit.rs","position":1040,"original_position":964,"commit_id":"8d40a4376d5e78a849fa24db04050cf2bfcbf3d0","original_commit_id":"a3921801f492569da6f844fab7cbcf39bc6eef6d","user":{"login":"huonw","id":1203825,"avatar_url":"https://avatars.githubusercontent.com/u/1203825?v=3","gravatar_id":"","url":"https://api.github.com/users/huonw","html_url":"https://github.com/huonw","followers_url":"https://api.github.com/users/huonw/followers","following_url":"https://api.github.com/users/huonw/following{/other_user}","gists_url":"https://api.github.com/users/huonw/gists{/gist_id}","starred_url":"https://api.github.com/users/huonw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/huonw/subscriptions","organizations_url":"https://api.github.com/users/huonw/orgs","repos_url":"https://api.github.com/users/huonw/repos","events_url":"https://api.github.com/users/huonw/events{/privacy}","received_events_url":"https://api.github.com/users/huonw/received_events","type":"User","site_admin":false},"body":"Seems reasonable.","created_at":"2014-11-29T06:23:41Z","updated_at":"2014-11-29T06:23:41Z","html_url":"https://github.com/rust-lang/rust/pull/19216#discussion_r21048830","pull_request_url":"https://api.github.com/repos/rust-lang/rust/pulls/19216","_links":{"self":{"href":"https://api.github.com/repos/rust-lang/rust/pulls/comments/21048830"},"html":{"href":"https://github.com/rust-lang/rust/pull/19216#discussion_r21048830"},"pull_request":{"href":"https://api.github.com/repos/rust-lang/rust/pulls/19216"}}},"pull_request":{"url":"https://api.github.com/repos/rust-lang/rust/pulls/19216","id":24891542,"html_url":"https://github.com/rust-lang/rust/pull/19216","diff_url":"https://github.com/rust-lang/rust/pull/19216.diff","patch_url":"https://github.com/rust-lang/rust/pull/19216.patch","issue_url":"https://api.github.com/repos/rust-lang/rust/issues/19216","number":19216,"state":"open","locked":false,"title":"Conventions and cleanup for Bitv and BitvSet","user":{"login":"Gankro","id":1136864,"avatar_url":"https://avatars.githubusercontent.com/u/1136864?v=3","gravatar_id":"","url":"https://api.github.com/users/Gankro","html_url":"https://github.com/Gankro","followers_url":"https://api.github.com/users/Gankro/followers","following_url":"https://api.github.com/users/Gankro/following{/other_user}","gists_url":"https://api.github.com/users/Gankro/gists{/gist_id}","starred_url":"https://api.github.com/users/Gankro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Gankro/subscriptions","organizations_url":"https://api.github.com/users/Gankro/orgs","repos_url":"https://api.github.com/users/Gankro/repos","events_url":"https://api.github.com/users/Gankro/events{/privacy}","received_events_url":"https://api.github.com/users/Gankro/received_events","type":"User","site_admin":false},"body":"Part of #18424\r\n\r\nThis commit changes the semantics of `reserve` and `capacity` for Bitv and BitvSet to match conventions. It also introduces the notion of `reserve_index` and `reserve_index_exact` for collections with maximum-index-based capacity semantics.\r\n\r\nDeprecates free function constructors in favour of functions on Bitv itself.\r\n\r\nChanges `Bitv::pop` to return an Option rather than panicking.\r\n\r\nDeprecates and renames several methods in favour of conventions.\r\n\r\nMarks several blessed methods as unstable.\r\n\r\nThis commit also substantially refactors Bitv and BitvSet's implementations. The new implementation is simpler, cleaner, better documented, and more robust against overflows. It also reduces coupling between Bitv and BitvSet. Tests have been seperated into seperate submodules.\r\n\r\nFixes #16958\r\n\r\n[breaking-change]","created_at":"2014-11-22T18:17:24Z","updated_at":"2014-11-29T06:23:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4b4c078cd8addb946b307153aebed6faea7ef028","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/rust-lang/rust/pulls/19216/commits","review_comments_url":"https://api.github.com/repos/rust-lang/rust/pulls/19216/comments","review_comment_url":"https://api.github.com/repos/rust-lang/rust/pulls/comments/{number}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/19216/comments","statuses_url":"https://api.github.com/repos/rust-lang/rust/statuses/8d40a4376d5e78a849fa24db04050cf2bfcbf3d0","head":{"label":"Gankro:bitv","ref":"bitv","sha":"8d40a4376d5e78a849fa24db04050cf2bfcbf3d0","user":{"login":"Gankro","id":1136864,"avatar_url":"https://avatars.githubusercontent.com/u/1136864?v=3","gravatar_id":"","url":"https://api.github.com/users/Gankro","html_url":"https://github.com/Gankro","followers_url":"https://api.github.com/users/Gankro/followers","following_url":"https://api.github.com/users/Gankro/following{/other_user}","gists_url":"https://api.github.com/users/Gankro/gists{/gist_id}","starred_url":"https://api.github.com/users/Gankro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Gankro/subscriptions","organizations_url":"https://api.github.com/users/Gankro/orgs","repos_url":"https://api.github.com/users/Gankro/repos","events_url":"https://api.github.com/users/Gankro/events{/privacy}","received_events_url":"https://api.github.com/users/Gankro/received_events","type":"User","site_admin":false},"repo":{"id":21621250,"name":"rust","full_name":"Gankro/rust","owner":{"login":"Gankro","id":1136864,"avatar_url":"https://avatars.githubusercontent.com/u/1136864?v=3","gravatar_id":"","url":"https://api.github.com/users/Gankro","html_url":"https://github.com/Gankro","followers_url":"https://api.github.com/users/Gankro/followers","following_url":"https://api.github.com/users/Gankro/following{/other_user}","gists_url":"https://api.github.com/users/Gankro/gists{/gist_id}","starred_url":"https://api.github.com/users/Gankro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Gankro/subscriptions","organizations_url":"https://api.github.com/users/Gankro/orgs","repos_url":"https://api.github.com/users/Gankro/repos","events_url":"https://api.github.com/users/Gankro/events{/privacy}","received_events_url":"https://api.github.com/users/Gankro/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Gankro/rust","description":"a safe, concurrent, practical language","fork":true,"url":"https://api.github.com/repos/Gankro/rust","forks_url":"https://api.github.com/repos/Gankro/rust/forks","keys_url":"https://api.github.com/repos/Gankro/rust/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Gankro/rust/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Gankro/rust/teams","hooks_url":"https://api.github.com/repos/Gankro/rust/hooks","issue_events_url":"https://api.github.com/repos/Gankro/rust/issues/events{/number}","events_url":"https://api.github.com/repos/Gankro/rust/events","assignees_url":"https://api.github.com/repos/Gankro/rust/assignees{/user}","branches_url":"https://api.github.com/repos/Gankro/rust/branches{/branch}","tags_url":"https://api.github.com/repos/Gankro/rust/tags","blobs_url":"https://api.github.com/repos/Gankro/rust/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Gankro/rust/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Gankro/rust/git/refs{/sha}","trees_url":"https://api.github.com/repos/Gankro/rust/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Gankro/rust/statuses/{sha}","languages_url":"https://api.github.com/repos/Gankro/rust/languages","stargazers_url":"https://api.github.com/repos/Gankro/rust/stargazers","contributors_url":"https://api.github.com/repos/Gankro/rust/contributors","subscribers_url":"https://api.github.com/repos/Gankro/rust/subscribers","subscription_url":"https://api.github.com/repos/Gankro/rust/subscription","commits_url":"https://api.github.com/repos/Gankro/rust/commits{/sha}","git_commits_url":"https://api.github.com/repos/Gankro/rust/git/commits{/sha}","comments_url":"https://api.github.com/repos/Gankro/rust/comments{/number}","issue_comment_url":"https://api.github.com/repos/Gankro/rust/issues/comments/{number}","contents_url":"https://api.github.com/repos/Gankro/rust/contents/{+path}","compare_url":"https://api.github.com/repos/Gankro/rust/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Gankro/rust/merges","archive_url":"https://api.github.com/repos/Gankro/rust/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Gankro/rust/downloads","issues_url":"https://api.github.com/repos/Gankro/rust/issues{/number}","pulls_url":"https://api.github.com/repos/Gankro/rust/pulls{/number}","milestones_url":"https://api.github.com/repos/Gankro/rust/milestones{/number}","notifications_url":"https://api.github.com/repos/Gankro/rust/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Gankro/rust/labels{/name}","releases_url":"https://api.github.com/repos/Gankro/rust/releases{/id}","created_at":"2014-07-08T16:53:48Z","updated_at":"2014-07-08T22:25:33Z","pushed_at":"2014-11-29T05:46:11Z","git_url":"git://github.com/Gankro/rust.git","ssh_url":"git@github.com:Gankro/rust.git","clone_url":"https://github.com/Gankro/rust.git","svn_url":"https://github.com/Gankro/rust","homepage":"http://www.rust-lang.org","size":188066,"stargazers_count":0,"watchers_count":0,"language":"Rust","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"rust-lang:master","ref":"master","sha":"caec7b0414ae8e6baa3ca4c3b3da4ec01d9091af","user":{"login":"rust-lang","id":5430905,"avatar_url":"https://avatars.githubusercontent.com/u/5430905?v=3","gravatar_id":"","url":"https://api.github.com/users/rust-lang","html_url":"https://github.com/rust-lang","followers_url":"https://api.github.com/users/rust-lang/followers","following_url":"https://api.github.com/users/rust-lang/following{/other_user}","gists_url":"https://api.github.com/users/rust-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/rust-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rust-lang/subscriptions","organizations_url":"https://api.github.com/users/rust-lang/orgs","repos_url":"https://api.github.com/users/rust-lang/repos","events_url":"https://api.github.com/users/rust-lang/events{/privacy}","received_events_url":"https://api.github.com/users/rust-lang/received_events","type":"Organization","site_admin":false},"repo":{"id":724712,"name":"rust","full_name":"rust-lang/rust","owner":{"login":"rust-lang","id":5430905,"avatar_url":"https://avatars.githubusercontent.com/u/5430905?v=3","gravatar_id":"","url":"https://api.github.com/users/rust-lang","html_url":"https://github.com/rust-lang","followers_url":"https://api.github.com/users/rust-lang/followers","following_url":"https://api.github.com/users/rust-lang/following{/other_user}","gists_url":"https://api.github.com/users/rust-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/rust-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rust-lang/subscriptions","organizations_url":"https://api.github.com/users/rust-lang/orgs","repos_url":"https://api.github.com/users/rust-lang/repos","events_url":"https://api.github.com/users/rust-lang/events{/privacy}","received_events_url":"https://api.github.com/users/rust-lang/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rust-lang/rust","description":"a safe, concurrent, practical language","fork":false,"url":"https://api.github.com/repos/rust-lang/rust","forks_url":"https://api.github.com/repos/rust-lang/rust/forks","keys_url":"https://api.github.com/repos/rust-lang/rust/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rust-lang/rust/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rust-lang/rust/teams","hooks_url":"https://api.github.com/repos/rust-lang/rust/hooks","issue_events_url":"https://api.github.com/repos/rust-lang/rust/issues/events{/number}","events_url":"https://api.github.com/repos/rust-lang/rust/events","assignees_url":"https://api.github.com/repos/rust-lang/rust/assignees{/user}","branches_url":"https://api.github.com/repos/rust-lang/rust/branches{/branch}","tags_url":"https://api.github.com/repos/rust-lang/rust/tags","blobs_url":"https://api.github.com/repos/rust-lang/rust/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rust-lang/rust/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rust-lang/rust/git/refs{/sha}","trees_url":"https://api.github.com/repos/rust-lang/rust/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rust-lang/rust/statuses/{sha}","languages_url":"https://api.github.com/repos/rust-lang/rust/languages","stargazers_url":"https://api.github.com/repos/rust-lang/rust/stargazers","contributors_url":"https://api.github.com/repos/rust-lang/rust/contributors","subscribers_url":"https://api.github.com/repos/rust-lang/rust/subscribers","subscription_url":"https://api.github.com/repos/rust-lang/rust/subscription","commits_url":"https://api.github.com/repos/rust-lang/rust/commits{/sha}","git_commits_url":"https://api.github.com/repos/rust-lang/rust/git/commits{/sha}","comments_url":"https://api.github.com/repos/rust-lang/rust/comments{/number}","issue_comment_url":"https://api.github.com/repos/rust-lang/rust/issues/comments/{number}","contents_url":"https://api.github.com/repos/rust-lang/rust/contents/{+path}","compare_url":"https://api.github.com/repos/rust-lang/rust/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rust-lang/rust/merges","archive_url":"https://api.github.com/repos/rust-lang/rust/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rust-lang/rust/downloads","issues_url":"https://api.github.com/repos/rust-lang/rust/issues{/number}","pulls_url":"https://api.github.com/repos/rust-lang/rust/pulls{/number}","milestones_url":"https://api.github.com/repos/rust-lang/rust/milestones{/number}","notifications_url":"https://api.github.com/repos/rust-lang/rust/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rust-lang/rust/labels{/name}","releases_url":"https://api.github.com/repos/rust-lang/rust/releases{/id}","created_at":"2010-06-16T20:39:03Z","updated_at":"2014-11-29T03:29:03Z","pushed_at":"2014-11-29T02:31:24Z","git_url":"git://github.com/rust-lang/rust.git","ssh_url":"git@github.com:rust-lang/rust.git","clone_url":"https://github.com/rust-lang/rust.git","svn_url":"https://github.com/rust-lang/rust","homepage":"http://www.rust-lang.org","size":540918,"stargazers_count":7574,"watchers_count":7574,"language":"Rust","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1472,"mirror_url":null,"open_issues_count":2177,"forks":1472,"open_issues":2177,"watchers":7574,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rust-lang/rust/pulls/19216"},"html":{"href":"https://github.com/rust-lang/rust/pull/19216"},"issue":{"href":"https://api.github.com/repos/rust-lang/rust/issues/19216"},"comments":{"href":"https://api.github.com/repos/rust-lang/rust/issues/19216/comments"},"review_comments":{"href":"https://api.github.com/repos/rust-lang/rust/pulls/19216/comments"},"review_comment":{"href":"https://api.github.com/repos/rust-lang/rust/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/rust-lang/rust/pulls/19216/commits"},"statuses":{"href":"https://api.github.com/repos/rust-lang/rust/statuses/8d40a4376d5e78a849fa24db04050cf2bfcbf3d0"}}}}