{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/rfcs/issues/1137","labels_url":"https://api.github.com/repos/rust-lang/rfcs/issues/1137/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rfcs/issues/1137/comments","events_url":"https://api.github.com/repos/rust-lang/rfcs/issues/1137/events","html_url":"https://github.com/rust-lang/rfcs/issues/1137","id":82717209,"number":1137,"title":"Implement SliceConcatExt for any iterable of string slices, not just Slice and Vec","user":{"login":"BlacklightShining","id":1120859,"avatar_url":"https://avatars.githubusercontent.com/u/1120859?v=3","gravatar_id":"","url":"https://api.github.com/users/BlacklightShining","html_url":"https://github.com/BlacklightShining","followers_url":"https://api.github.com/users/BlacklightShining/followers","following_url":"https://api.github.com/users/BlacklightShining/following{/other_user}","gists_url":"https://api.github.com/users/BlacklightShining/gists{/gist_id}","starred_url":"https://api.github.com/users/BlacklightShining/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BlacklightShining/subscriptions","organizations_url":"https://api.github.com/users/BlacklightShining/orgs","repos_url":"https://api.github.com/users/BlacklightShining/repos","events_url":"https://api.github.com/users/BlacklightShining/events{/privacy}","received_events_url":"https://api.github.com/users/BlacklightShining/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-05-30T06:07:18Z","updated_at":"2015-05-30T07:54:20Z","closed_at":null,"body":"Currently, these work (they both return `\"foo foo foo\"`, as you'd expect):\r\n\r\n```rust\r\n[\"foo\"; 3].connect(\" \")\r\nvec![\"foo\"; 3].connect(\" \")\r\n```\r\n\r\nBut these do not:\r\n\r\n```rust\r\n// type `collections::linked_list::LinkedList<&str>` does not implement any method in scope named `connect`\r\nLinkedList::from_iter(repeat(\"foo\").take(3)).connect(\" \")\r\n// type `core::iter::Take<core::iter::Repeat<&str>>` does not implement any method in scope named `connect`\r\nrepeat(\"foo\").take(3).connect(\" \")\r\n```\r\n\r\nMight [`std::slice::SliceConcatExt`](https://doc.rust-lang.org/std/slice/trait.SliceConcatExt.html), be implemented for collections of and iterators over `&str`s?"},"comment":{"url":"https://api.github.com/repos/rust-lang/rfcs/issues/comments/107005095","html_url":"https://github.com/rust-lang/rfcs/issues/1137#issuecomment-107005095","issue_url":"https://api.github.com/repos/rust-lang/rfcs/issues/1137","id":107005095,"user":{"login":"bluss","id":3209739,"avatar_url":"https://avatars.githubusercontent.com/u/3209739?v=3","gravatar_id":"","url":"https://api.github.com/users/bluss","html_url":"https://github.com/bluss","followers_url":"https://api.github.com/users/bluss/followers","following_url":"https://api.github.com/users/bluss/following{/other_user}","gists_url":"https://api.github.com/users/bluss/gists{/gist_id}","starred_url":"https://api.github.com/users/bluss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bluss/subscriptions","organizations_url":"https://api.github.com/users/bluss/orgs","repos_url":"https://api.github.com/users/bluss/repos","events_url":"https://api.github.com/users/bluss/events{/privacy}","received_events_url":"https://api.github.com/users/bluss/received_events","type":"User","site_admin":false},"created_at":"2015-05-30T07:54:20Z","updated_at":"2015-05-30T07:54:20Z","body":"I think coherence should allow it. Note that the slice versions twice, to calculate the needed allocation exactly. The iterator version can't do that, so it will be less efficient that way."}}