{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/rust/issues/34389","repository_url":"https://api.github.com/repos/rust-lang/rust","labels_url":"https://api.github.com/repos/rust-lang/rust/issues/34389/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/34389/comments","events_url":"https://api.github.com/repos/rust-lang/rust/issues/34389/events","html_url":"https://github.com/rust-lang/rust/pull/34389","id":161311451,"number":34389,"title":"DRY up FromIterator implementation for String","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},"labels":[],"state":"open","locked":false,"assignee":{"login":"brson","id":147214,"avatar_url":"https://avatars.githubusercontent.com/u/147214?v=3","gravatar_id":"","url":"https://api.github.com/users/brson","html_url":"https://github.com/brson","followers_url":"https://api.github.com/users/brson/followers","following_url":"https://api.github.com/users/brson/following{/other_user}","gists_url":"https://api.github.com/users/brson/gists{/gist_id}","starred_url":"https://api.github.com/users/brson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brson/subscriptions","organizations_url":"https://api.github.com/users/brson/orgs","repos_url":"https://api.github.com/users/brson/repos","events_url":"https://api.github.com/users/brson/events{/privacy}","received_events_url":"https://api.github.com/users/brson/received_events","type":"User","site_admin":false},"milestone":null,"comments":4,"created_at":"2016-06-20T22:33:12Z","updated_at":"2016-06-21T00:29:55Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/rust-lang/rust/pulls/34389","html_url":"https://github.com/rust-lang/rust/pull/34389","diff_url":"https://github.com/rust-lang/rust/pull/34389.diff","patch_url":"https://github.com/rust-lang/rust/pull/34389.patch"},"body":"Instead of repeating the same implementation three times, `impl FromIterator<T>\r\nfor String where String: Extend<T>`.\r\n\r\nAllow specialization to avoid breaking anything (otherwise, adding a blanket impl would be a breaking change)."},"comment":{"url":"https://api.github.com/repos/rust-lang/rust/issues/comments/227309014","html_url":"https://github.com/rust-lang/rust/pull/34389#issuecomment-227309014","issue_url":"https://api.github.com/repos/rust-lang/rust/issues/34389","id":227309014,"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},"created_at":"2016-06-21T00:29:55Z","updated_at":"2016-06-21T00:29:55Z","body":"I was under the impression that specialization would fix that (this is a default impl) but I'll add a run-pass test case to check that.\n\nOn June 20, 2016 8:05:26 PM EDT, eefriedman <notifications@github.com> wrote:\n>I think this breaks code like the following:\n>\n>```\n>use std::iter::FromIterator;\n>struct S;\n>impl FromIterator<S> for String {\n>  fn from_iter<T: IntoIterator<Item=S>>(s: T) -> String {\n>    let mut fin = String::new();\n>    for S in s {\n>      fin.push('a');\n>    }\n>    fin\n>  }\n>}\n>```\n>\n>---\n>You are receiving this because you authored the thread.\n>Reply to this email directly or view it on GitHub:\n>https://github.com/rust-lang/rust/pull/34389#issuecomment-227305533\n\n-- \nSteven Allen"}}
{"actor":{"display_login":"Stebalien"}}