{"action":"created","comment":{"url":"https://api.github.com/repos/rust-lang/rust/pulls/comments/31164857","id":31164857,"diff_hunk":"@@ -3030,6 +3030,45 @@ pub fn repeat<T: Clone>(elt: T) -> Repeat<T> {\n     Repeat{element: elt}\n }\n \n+/// An iterator that yields nothing.\n+#[unstable(feature=\"core\", reason = \"new addition\")]\n+pub struct Empty<T>(marker::PhantomData<T>);\n+\n+impl<T> Iterator for Empty<T> {\n+    type Item = T;\n+\n+    fn next(&mut self) -> Option<T> {\n+        None\n+    }\n+}\n+\n+/// Creates an iterator that yields nothing.\n+#[unstable(feature=\"core\", reason = \"new addition\")]\n+pub fn empty<T>() -> Empty<T> {\n+    Empty(marker::PhantomData)\n+}\n+\n+\n+/// An iterator that yields an element exactly once.\n+#[unstable(feature=\"core\", reason = \"new addition\")]\n+pub struct Once<T> {\n+    inner: ::option::IntoIter<T>","path":"src/libcore/iter.rs","position":26,"original_position":26,"commit_id":"c63d7959aeeeb97a84cb3c3c0efb5cf616b3d1fa","original_commit_id":"c63d7959aeeeb97a84cb3c3c0efb5cf616b3d1fa","user":{"login":"Stebalien","id":310393,"avatar_url":"https://avatars.githubusercontent.com/u/310393?v=3","gravatar_id":"","url":"https://api.github.com/users/Stebalien","html_url":"https://github.com/Stebalien","followers_url":"https://api.github.com/users/Stebalien/followers","following_url":"https://api.github.com/users/Stebalien/following{/other_user}","gists_url":"https://api.github.com/users/Stebalien/gists{/gist_id}","starred_url":"https://api.github.com/users/Stebalien/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Stebalien/subscriptions","organizations_url":"https://api.github.com/users/Stebalien/orgs","repos_url":"https://api.github.com/users/Stebalien/repos","events_url":"https://api.github.com/users/Stebalien/events{/privacy}","received_events_url":"https://api.github.com/users/Stebalien/received_events","type":"User","site_admin":false},"body":"That's three levels of indirection (IntoIter -> Item -> Option) but I guess they'll just get optimized away anyways.","created_at":"2015-05-27T18:27:42Z","updated_at":"2015-05-27T18:27:42Z","html_url":"https://github.com/rust-lang/rust/pull/25817#discussion_r31164857","pull_request_url":"https://api.github.com/repos/rust-lang/rust/pulls/25817","_links":{"self":{"href":"https://api.github.com/repos/rust-lang/rust/pulls/comments/31164857"},"html":{"href":"https://github.com/rust-lang/rust/pull/25817#discussion_r31164857"},"pull_request":{"href":"https://api.github.com/repos/rust-lang/rust/pulls/25817"}}},"pull_request":{"url":"https://api.github.com/repos/rust-lang/rust/pulls/25817","id":36271500,"html_url":"https://github.com/rust-lang/rust/pull/25817","diff_url":"https://github.com/rust-lang/rust/pull/25817.diff","patch_url":"https://github.com/rust-lang/rust/pull/25817.patch","issue_url":"https://api.github.com/repos/rust-lang/rust/issues/25817","number":25817,"state":"open","locked":false,"title":"Implement std::iter::once/empty (RFC 771)","user":{"login":"XMPPwocky","id":1250666,"avatar_url":"https://avatars.githubusercontent.com/u/1250666?v=3","gravatar_id":"","url":"https://api.github.com/users/XMPPwocky","html_url":"https://github.com/XMPPwocky","followers_url":"https://api.github.com/users/XMPPwocky/followers","following_url":"https://api.github.com/users/XMPPwocky/following{/other_user}","gists_url":"https://api.github.com/users/XMPPwocky/gists{/gist_id}","starred_url":"https://api.github.com/users/XMPPwocky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/XMPPwocky/subscriptions","organizations_url":"https://api.github.com/users/XMPPwocky/orgs","repos_url":"https://api.github.com/users/XMPPwocky/repos","events_url":"https://api.github.com/users/XMPPwocky/events{/privacy}","received_events_url":"https://api.github.com/users/XMPPwocky/received_events","type":"User","site_admin":false},"body":"Closes #24443.","created_at":"2015-05-27T05:58:53Z","updated_at":"2015-05-27T18:27:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a23e6a8a62ef6dcbca559eccd5ab3337c066ce44","assignee":{"login":"aturon","id":709807,"avatar_url":"https://avatars.githubusercontent.com/u/709807?v=3","gravatar_id":"","url":"https://api.github.com/users/aturon","html_url":"https://github.com/aturon","followers_url":"https://api.github.com/users/aturon/followers","following_url":"https://api.github.com/users/aturon/following{/other_user}","gists_url":"https://api.github.com/users/aturon/gists{/gist_id}","starred_url":"https://api.github.com/users/aturon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aturon/subscriptions","organizations_url":"https://api.github.com/users/aturon/orgs","repos_url":"https://api.github.com/users/aturon/repos","events_url":"https://api.github.com/users/aturon/events{/privacy}","received_events_url":"https://api.github.com/users/aturon/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/rust-lang/rust/pulls/25817/commits","review_comments_url":"https://api.github.com/repos/rust-lang/rust/pulls/25817/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/25817/comments","statuses_url":"https://api.github.com/repos/rust-lang/rust/statuses/c63d7959aeeeb97a84cb3c3c0efb5cf616b3d1fa","head":{"label":"XMPPwocky:once_cleanedup","ref":"once_cleanedup","sha":"c63d7959aeeeb97a84cb3c3c0efb5cf616b3d1fa","user":{"login":"XMPPwocky","id":1250666,"avatar_url":"https://avatars.githubusercontent.com/u/1250666?v=3","gravatar_id":"","url":"https://api.github.com/users/XMPPwocky","html_url":"https://github.com/XMPPwocky","followers_url":"https://api.github.com/users/XMPPwocky/followers","following_url":"https://api.github.com/users/XMPPwocky/following{/other_user}","gists_url":"https://api.github.com/users/XMPPwocky/gists{/gist_id}","starred_url":"https://api.github.com/users/XMPPwocky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/XMPPwocky/subscriptions","organizations_url":"https://api.github.com/users/XMPPwocky/orgs","repos_url":"https://api.github.com/users/XMPPwocky/repos","events_url":"https://api.github.com/users/XMPPwocky/events{/privacy}","received_events_url":"https://api.github.com/users/XMPPwocky/received_events","type":"User","site_admin":false},"repo":{"id":26032749,"name":"rust","full_name":"XMPPwocky/rust","owner":{"login":"XMPPwocky","id":1250666,"avatar_url":"https://avatars.githubusercontent.com/u/1250666?v=3","gravatar_id":"","url":"https://api.github.com/users/XMPPwocky","html_url":"https://github.com/XMPPwocky","followers_url":"https://api.github.com/users/XMPPwocky/followers","following_url":"https://api.github.com/users/XMPPwocky/following{/other_user}","gists_url":"https://api.github.com/users/XMPPwocky/gists{/gist_id}","starred_url":"https://api.github.com/users/XMPPwocky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/XMPPwocky/subscriptions","organizations_url":"https://api.github.com/users/XMPPwocky/orgs","repos_url":"https://api.github.com/users/XMPPwocky/repos","events_url":"https://api.github.com/users/XMPPwocky/events{/privacy}","received_events_url":"https://api.github.com/users/XMPPwocky/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/XMPPwocky/rust","description":"a safe, concurrent, practical language","fork":true,"url":"https://api.github.com/repos/XMPPwocky/rust","forks_url":"https://api.github.com/repos/XMPPwocky/rust/forks","keys_url":"https://api.github.com/repos/XMPPwocky/rust/keys{/key_id}","collaborators_url":"https://api.github.com/repos/XMPPwocky/rust/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/XMPPwocky/rust/teams","hooks_url":"https://api.github.com/repos/XMPPwocky/rust/hooks","issue_events_url":"https://api.github.com/repos/XMPPwocky/rust/issues/events{/number}","events_url":"https://api.github.com/repos/XMPPwocky/rust/events","assignees_url":"https://api.github.com/repos/XMPPwocky/rust/assignees{/user}","branches_url":"https://api.github.com/repos/XMPPwocky/rust/branches{/branch}","tags_url":"https://api.github.com/repos/XMPPwocky/rust/tags","blobs_url":"https://api.github.com/repos/XMPPwocky/rust/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/XMPPwocky/rust/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/XMPPwocky/rust/git/refs{/sha}","trees_url":"https://api.github.com/repos/XMPPwocky/rust/git/trees{/sha}","statuses_url":"https://api.github.com/repos/XMPPwocky/rust/statuses/{sha}","languages_url":"https://api.github.com/repos/XMPPwocky/rust/languages","stargazers_url":"https://api.github.com/repos/XMPPwocky/rust/stargazers","contributors_url":"https://api.github.com/repos/XMPPwocky/rust/contributors","subscribers_url":"https://api.github.com/repos/XMPPwocky/rust/subscribers","subscription_url":"https://api.github.com/repos/XMPPwocky/rust/subscription","commits_url":"https://api.github.com/repos/XMPPwocky/rust/commits{/sha}","git_commits_url":"https://api.github.com/repos/XMPPwocky/rust/git/commits{/sha}","comments_url":"https://api.github.com/repos/XMPPwocky/rust/comments{/number}","issue_comment_url":"https://api.github.com/repos/XMPPwocky/rust/issues/comments{/number}","contents_url":"https://api.github.com/repos/XMPPwocky/rust/contents/{+path}","compare_url":"https://api.github.com/repos/XMPPwocky/rust/compare/{base}...{head}","merges_url":"https://api.github.com/repos/XMPPwocky/rust/merges","archive_url":"https://api.github.com/repos/XMPPwocky/rust/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/XMPPwocky/rust/downloads","issues_url":"https://api.github.com/repos/XMPPwocky/rust/issues{/number}","pulls_url":"https://api.github.com/repos/XMPPwocky/rust/pulls{/number}","milestones_url":"https://api.github.com/repos/XMPPwocky/rust/milestones{/number}","notifications_url":"https://api.github.com/repos/XMPPwocky/rust/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/XMPPwocky/rust/labels{/name}","releases_url":"https://api.github.com/repos/XMPPwocky/rust/releases{/id}","created_at":"2014-10-31T20:51:57Z","updated_at":"2015-05-26T23:44:42Z","pushed_at":"2015-05-27T05:58:11Z","git_url":"git://github.com/XMPPwocky/rust.git","ssh_url":"git@github.com:XMPPwocky/rust.git","clone_url":"https://github.com/XMPPwocky/rust.git","svn_url":"https://github.com/XMPPwocky/rust","homepage":"http://www.rust-lang.org","size":291627,"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":"a97b3ff16ffb7370642b674ce154a827bf69b8d8","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":"2015-05-27T18:26:17Z","pushed_at":"2015-05-27T18:15:27Z","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":665983,"stargazers_count":11816,"watchers_count":11816,"language":"Rust","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2266,"mirror_url":null,"open_issues_count":2076,"forks":2266,"open_issues":2076,"watchers":11816,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rust-lang/rust/pulls/25817"},"html":{"href":"https://github.com/rust-lang/rust/pull/25817"},"issue":{"href":"https://api.github.com/repos/rust-lang/rust/issues/25817"},"comments":{"href":"https://api.github.com/repos/rust-lang/rust/issues/25817/comments"},"review_comments":{"href":"https://api.github.com/repos/rust-lang/rust/pulls/25817/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/25817/commits"},"statuses":{"href":"https://api.github.com/repos/rust-lang/rust/statuses/c63d7959aeeeb97a84cb3c3c0efb5cf616b3d1fa"}}}}