{"action":"created","comment":{"url":"https://api.github.com/repos/rust-lang/rust/pulls/comments/38217650","id":38217650,"diff_hunk":"@@ -347,6 +371,18 @@ impl<'a> DoubleEndedIterator for CharIndices<'a> {\n #[derive(Clone)]\n pub struct Bytes<'a>(Map<slice::Iter<'a, u8>, BytesDeref>);\n \n+impl<'a> Bytes<'a> {\n+    /// View the underlying data as a subslice of the original data.\n+    ///\n+    /// This has the same lifetime as the original slice, and so the\n+    /// iterator can continue to be used while this exists.\n+    #[unstable(feature = \"iter_to_slice\", issue = \"27775\")]\n+    #[inline]\n+    pub fn as_str(&self) -> &'a str {","path":"src/libcore/str/mod.rs","position":49,"original_position":49,"commit_id":"1234e91768bb629dcfb97c0ad75d2f51ab234c25","original_commit_id":"1234e91768bb629dcfb97c0ad75d2f51ab234c25","user":{"login":"alexcrichton","id":64996,"avatar_url":"https://avatars.githubusercontent.com/u/64996?v=3","gravatar_id":"","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":"Can this safely be done? We don't know that iteration isn't in the middle of a multi byte character, right?","created_at":"2015-08-28T16:28:07Z","updated_at":"2015-08-28T16:28:07Z","html_url":"https://github.com/rust-lang/rust/pull/27900#discussion_r38217650","pull_request_url":"https://api.github.com/repos/rust-lang/rust/pulls/27900","_links":{"self":{"href":"https://api.github.com/repos/rust-lang/rust/pulls/comments/38217650"},"html":{"href":"https://github.com/rust-lang/rust/pull/27900#discussion_r38217650"},"pull_request":{"href":"https://api.github.com/repos/rust-lang/rust/pulls/27900"}}},"pull_request":{"url":"https://api.github.com/repos/rust-lang/rust/pulls/27900","id":42829017,"html_url":"https://github.com/rust-lang/rust/pull/27900","diff_url":"https://github.com/rust-lang/rust/pull/27900.diff","patch_url":"https://github.com/rust-lang/rust/pull/27900.patch","issue_url":"https://api.github.com/repos/rust-lang/rust/issues/27900","number":27900,"state":"open","locked":false,"title":"Add `Chars::as_str`.","user":{"login":"SimonSapin","id":291359,"avatar_url":"https://avatars.githubusercontent.com/u/291359?v=3","gravatar_id":"","url":"https://api.github.com/users/SimonSapin","html_url":"https://github.com/SimonSapin","followers_url":"https://api.github.com/users/SimonSapin/followers","following_url":"https://api.github.com/users/SimonSapin/following{/other_user}","gists_url":"https://api.github.com/users/SimonSapin/gists{/gist_id}","starred_url":"https://api.github.com/users/SimonSapin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SimonSapin/subscriptions","organizations_url":"https://api.github.com/users/SimonSapin/orgs","repos_url":"https://api.github.com/users/SimonSapin/repos","events_url":"https://api.github.com/users/SimonSapin/events{/privacy}","received_events_url":"https://api.github.com/users/SimonSapin/received_events","type":"User","site_admin":false},"body":"See #27775.\r\n\r\nr? @alexcrichton ","created_at":"2015-08-19T15:34:34Z","updated_at":"2015-08-28T16:28:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"df1ddd086aaf0c78aaefb89c51547d5b6c10cdc4","assignee":{"login":"alexcrichton","id":64996,"avatar_url":"https://avatars.githubusercontent.com/u/64996?v=3","gravatar_id":"","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},"milestone":null,"commits_url":"https://api.github.com/repos/rust-lang/rust/pulls/27900/commits","review_comments_url":"https://api.github.com/repos/rust-lang/rust/pulls/27900/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/27900/comments","statuses_url":"https://api.github.com/repos/rust-lang/rust/statuses/1234e91768bb629dcfb97c0ad75d2f51ab234c25","head":{"label":"SimonSapin:Chars_as_str","ref":"Chars_as_str","sha":"1234e91768bb629dcfb97c0ad75d2f51ab234c25","user":{"login":"SimonSapin","id":291359,"avatar_url":"https://avatars.githubusercontent.com/u/291359?v=3","gravatar_id":"","url":"https://api.github.com/users/SimonSapin","html_url":"https://github.com/SimonSapin","followers_url":"https://api.github.com/users/SimonSapin/followers","following_url":"https://api.github.com/users/SimonSapin/following{/other_user}","gists_url":"https://api.github.com/users/SimonSapin/gists{/gist_id}","starred_url":"https://api.github.com/users/SimonSapin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SimonSapin/subscriptions","organizations_url":"https://api.github.com/users/SimonSapin/orgs","repos_url":"https://api.github.com/users/SimonSapin/repos","events_url":"https://api.github.com/users/SimonSapin/events{/privacy}","received_events_url":"https://api.github.com/users/SimonSapin/received_events","type":"User","site_admin":false},"repo":{"id":7715452,"name":"rust","full_name":"SimonSapin/rust","owner":{"login":"SimonSapin","id":291359,"avatar_url":"https://avatars.githubusercontent.com/u/291359?v=3","gravatar_id":"","url":"https://api.github.com/users/SimonSapin","html_url":"https://github.com/SimonSapin","followers_url":"https://api.github.com/users/SimonSapin/followers","following_url":"https://api.github.com/users/SimonSapin/following{/other_user}","gists_url":"https://api.github.com/users/SimonSapin/gists{/gist_id}","starred_url":"https://api.github.com/users/SimonSapin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SimonSapin/subscriptions","organizations_url":"https://api.github.com/users/SimonSapin/orgs","repos_url":"https://api.github.com/users/SimonSapin/repos","events_url":"https://api.github.com/users/SimonSapin/events{/privacy}","received_events_url":"https://api.github.com/users/SimonSapin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/SimonSapin/rust","description":"a safe, concurrent, practical language","fork":true,"url":"https://api.github.com/repos/SimonSapin/rust","forks_url":"https://api.github.com/repos/SimonSapin/rust/forks","keys_url":"https://api.github.com/repos/SimonSapin/rust/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SimonSapin/rust/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SimonSapin/rust/teams","hooks_url":"https://api.github.com/repos/SimonSapin/rust/hooks","issue_events_url":"https://api.github.com/repos/SimonSapin/rust/issues/events{/number}","events_url":"https://api.github.com/repos/SimonSapin/rust/events","assignees_url":"https://api.github.com/repos/SimonSapin/rust/assignees{/user}","branches_url":"https://api.github.com/repos/SimonSapin/rust/branches{/branch}","tags_url":"https://api.github.com/repos/SimonSapin/rust/tags","blobs_url":"https://api.github.com/repos/SimonSapin/rust/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SimonSapin/rust/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SimonSapin/rust/git/refs{/sha}","trees_url":"https://api.github.com/repos/SimonSapin/rust/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SimonSapin/rust/statuses/{sha}","languages_url":"https://api.github.com/repos/SimonSapin/rust/languages","stargazers_url":"https://api.github.com/repos/SimonSapin/rust/stargazers","contributors_url":"https://api.github.com/repos/SimonSapin/rust/contributors","subscribers_url":"https://api.github.com/repos/SimonSapin/rust/subscribers","subscription_url":"https://api.github.com/repos/SimonSapin/rust/subscription","commits_url":"https://api.github.com/repos/SimonSapin/rust/commits{/sha}","git_commits_url":"https://api.github.com/repos/SimonSapin/rust/git/commits{/sha}","comments_url":"https://api.github.com/repos/SimonSapin/rust/comments{/number}","issue_comment_url":"https://api.github.com/repos/SimonSapin/rust/issues/comments{/number}","contents_url":"https://api.github.com/repos/SimonSapin/rust/contents/{+path}","compare_url":"https://api.github.com/repos/SimonSapin/rust/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SimonSapin/rust/merges","archive_url":"https://api.github.com/repos/SimonSapin/rust/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SimonSapin/rust/downloads","issues_url":"https://api.github.com/repos/SimonSapin/rust/issues{/number}","pulls_url":"https://api.github.com/repos/SimonSapin/rust/pulls{/number}","milestones_url":"https://api.github.com/repos/SimonSapin/rust/milestones{/number}","notifications_url":"https://api.github.com/repos/SimonSapin/rust/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SimonSapin/rust/labels{/name}","releases_url":"https://api.github.com/repos/SimonSapin/rust/releases{/id}","created_at":"2013-01-20T11:03:20Z","updated_at":"2014-08-09T22:01:15Z","pushed_at":"2015-08-28T13:41:31Z","git_url":"git://github.com/SimonSapin/rust.git","ssh_url":"git@github.com:SimonSapin/rust.git","clone_url":"https://github.com/SimonSapin/rust.git","svn_url":"https://github.com/SimonSapin/rust","homepage":"http://www.rust-lang.org","size":316151,"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":"6f28232756a6842acb1d2da6defdea43cfe95dde","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-08-28T15:52:43Z","pushed_at":"2015-08-28T15:43:30Z","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":671373,"stargazers_count":13155,"watchers_count":13155,"language":"Rust","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2553,"mirror_url":null,"open_issues_count":2243,"forks":2553,"open_issues":2243,"watchers":13155,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rust-lang/rust/pulls/27900"},"html":{"href":"https://github.com/rust-lang/rust/pull/27900"},"issue":{"href":"https://api.github.com/repos/rust-lang/rust/issues/27900"},"comments":{"href":"https://api.github.com/repos/rust-lang/rust/issues/27900/comments"},"review_comments":{"href":"https://api.github.com/repos/rust-lang/rust/pulls/27900/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/27900/commits"},"statuses":{"href":"https://api.github.com/repos/rust-lang/rust/statuses/1234e91768bb629dcfb97c0ad75d2f51ab234c25"}}}}