{"action":"created","comment":{"url":"https://api.github.com/repos/rust-lang/rust/pulls/comments/228396528","pull_request_review_id":168660859,"id":228396528,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyODM5NjUyOA==","diff_hunk":"@@ -2144,3 +2144,16 @@ fn test_monad_laws_associativity() {\n     assert_eq!((0..10).flat_map(f).flat_map(g).sum::<usize>(),\n                 (0..10).flat_map(|x| f(x).flat_map(g)).sum::<usize>());\n }\n+\n+#[test]\n+fn test_is_sorted() {\n+    assert!([1, 2, 2, 9].iter().is_sorted());\n+    assert!(![1, 3, 2].iter().is_sorted());\n+    assert!([0].iter().is_sorted());\n+    assert!(std::iter::empty::<i32>().is_sorted());\n+    assert!(![0.0, 1.0, std::f32::NAN].iter().is_sorted());\n+    assert!([-2, -1, 0, 3].iter().is_sorted());\n+    assert!(![-2i32, -1, 0, 3].iter().is_sorted_by_key(|n| n.abs()));\n+    assert!(![\"c\", \"bb\", \"aaa\"].iter().is_sorted());\n+    assert!([\"c\", \"bb\", \"aaa\"].iter().is_sorted_by_key(|s| s.len()));\n+}","path":"src/libcore/tests/iter.rs","position":16,"original_position":16,"commit_id":"6b46008f24b2681b9d333feb5b52aa619afd962d","original_commit_id":"b5ab524ea7b536617d8abc5507a1d97b3e60a42d","user":{"login":"kleimkuhler","id":4572153,"node_id":"MDQ6VXNlcjQ1NzIxNTM=","avatar_url":"https://avatars2.githubusercontent.com/u/4572153?v=4","gravatar_id":"","url":"https://api.github.com/users/kleimkuhler","html_url":"https://github.com/kleimkuhler","followers_url":"https://api.github.com/users/kleimkuhler/followers","following_url":"https://api.github.com/users/kleimkuhler/following{/other_user}","gists_url":"https://api.github.com/users/kleimkuhler/gists{/gist_id}","starred_url":"https://api.github.com/users/kleimkuhler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kleimkuhler/subscriptions","organizations_url":"https://api.github.com/users/kleimkuhler/orgs","repos_url":"https://api.github.com/users/kleimkuhler/repos","events_url":"https://api.github.com/users/kleimkuhler/events{/privacy}","received_events_url":"https://api.github.com/users/kleimkuhler/received_events","type":"User","site_admin":false},"body":"Thanks for pointing this out; I was not aware that `.iter()` was returning an `Iter<T>` instead of an `Iterator<T>`. Is changing these to `Vec` (e.g. `vec![\"c\", \"bb\", \"aaa\"].iter()`) enough to make sure it dispatches to the implementations of the `Iterator` trait?","created_at":"2018-10-26T03:28:40Z","updated_at":"2018-10-26T03:28:40Z","html_url":"https://github.com/rust-lang/rust/pull/55045#discussion_r228396528","pull_request_url":"https://api.github.com/repos/rust-lang/rust/pulls/55045","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/rust-lang/rust/pulls/comments/228396528"},"html":{"href":"https://github.com/rust-lang/rust/pull/55045#discussion_r228396528"},"pull_request":{"href":"https://api.github.com/repos/rust-lang/rust/pulls/55045"}},"in_reply_to_id":224987160},"pull_request":{"url":"https://api.github.com/repos/rust-lang/rust/pulls/55045","id":222662855,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIyNjYyODU1","html_url":"https://github.com/rust-lang/rust/pull/55045","diff_url":"https://github.com/rust-lang/rust/pull/55045.diff","patch_url":"https://github.com/rust-lang/rust/pull/55045.patch","issue_url":"https://api.github.com/repos/rust-lang/rust/issues/55045","number":55045,"state":"open","locked":false,"title":"Add `is_sorted` to `Iterator` and `[T]`","user":{"login":"kleimkuhler","id":4572153,"node_id":"MDQ6VXNlcjQ1NzIxNTM=","avatar_url":"https://avatars2.githubusercontent.com/u/4572153?v=4","gravatar_id":"","url":"https://api.github.com/users/kleimkuhler","html_url":"https://github.com/kleimkuhler","followers_url":"https://api.github.com/users/kleimkuhler/followers","following_url":"https://api.github.com/users/kleimkuhler/following{/other_user}","gists_url":"https://api.github.com/users/kleimkuhler/gists{/gist_id}","starred_url":"https://api.github.com/users/kleimkuhler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kleimkuhler/subscriptions","organizations_url":"https://api.github.com/users/kleimkuhler/orgs","repos_url":"https://api.github.com/users/kleimkuhler/repos","events_url":"https://api.github.com/users/kleimkuhler/events{/privacy}","received_events_url":"https://api.github.com/users/kleimkuhler/received_events","type":"User","site_admin":false},"body":"This is an initial implementation for the first step of [RFC 2351](https://github.com/rust-lang/rfcs/blob/master/text/2351-is-sorted.md)\r\n\r\nTracking issue: https://github.com/rust-lang/rust/issues/53485","created_at":"2018-10-13T17:12:45Z","updated_at":"2018-10-26T03:28:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4eabfade641c942e8b98134c22cea52efcd2fccb","assignee":{"login":"KodrAus","id":6721458,"node_id":"MDQ6VXNlcjY3MjE0NTg=","avatar_url":"https://avatars0.githubusercontent.com/u/6721458?v=4","gravatar_id":"","url":"https://api.github.com/users/KodrAus","html_url":"https://github.com/KodrAus","followers_url":"https://api.github.com/users/KodrAus/followers","following_url":"https://api.github.com/users/KodrAus/following{/other_user}","gists_url":"https://api.github.com/users/KodrAus/gists{/gist_id}","starred_url":"https://api.github.com/users/KodrAus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KodrAus/subscriptions","organizations_url":"https://api.github.com/users/KodrAus/orgs","repos_url":"https://api.github.com/users/KodrAus/repos","events_url":"https://api.github.com/users/KodrAus/events{/privacy}","received_events_url":"https://api.github.com/users/KodrAus/received_events","type":"User","site_admin":false},"assignees":[{"login":"KodrAus","id":6721458,"node_id":"MDQ6VXNlcjY3MjE0NTg=","avatar_url":"https://avatars0.githubusercontent.com/u/6721458?v=4","gravatar_id":"","url":"https://api.github.com/users/KodrAus","html_url":"https://github.com/KodrAus","followers_url":"https://api.github.com/users/KodrAus/followers","following_url":"https://api.github.com/users/KodrAus/following{/other_user}","gists_url":"https://api.github.com/users/KodrAus/gists{/gist_id}","starred_url":"https://api.github.com/users/KodrAus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KodrAus/subscriptions","organizations_url":"https://api.github.com/users/KodrAus/orgs","repos_url":"https://api.github.com/users/KodrAus/repos","events_url":"https://api.github.com/users/KodrAus/events{/privacy}","received_events_url":"https://api.github.com/users/KodrAus/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":583426710,"node_id":"MDU6TGFiZWw1ODM0MjY3MTA=","url":"https://api.github.com/repos/rust-lang/rust/labels/S-waiting-on-review","name":"S-waiting-on-review","color":"d3dddd","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/rust-lang/rust/pulls/55045/commits","review_comments_url":"https://api.github.com/repos/rust-lang/rust/pulls/55045/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/55045/comments","statuses_url":"https://api.github.com/repos/rust-lang/rust/statuses/6b46008f24b2681b9d333feb5b52aa619afd962d","head":{"label":"kleimkuhler:add-std-is_sorted","ref":"add-std-is_sorted","sha":"6b46008f24b2681b9d333feb5b52aa619afd962d","user":{"login":"kleimkuhler","id":4572153,"node_id":"MDQ6VXNlcjQ1NzIxNTM=","avatar_url":"https://avatars2.githubusercontent.com/u/4572153?v=4","gravatar_id":"","url":"https://api.github.com/users/kleimkuhler","html_url":"https://github.com/kleimkuhler","followers_url":"https://api.github.com/users/kleimkuhler/followers","following_url":"https://api.github.com/users/kleimkuhler/following{/other_user}","gists_url":"https://api.github.com/users/kleimkuhler/gists{/gist_id}","starred_url":"https://api.github.com/users/kleimkuhler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kleimkuhler/subscriptions","organizations_url":"https://api.github.com/users/kleimkuhler/orgs","repos_url":"https://api.github.com/users/kleimkuhler/repos","events_url":"https://api.github.com/users/kleimkuhler/events{/privacy}","received_events_url":"https://api.github.com/users/kleimkuhler/received_events","type":"User","site_admin":false},"repo":{"id":150049113,"node_id":"MDEwOlJlcG9zaXRvcnkxNTAwNDkxMTM=","name":"rust","full_name":"kleimkuhler/rust","private":false,"owner":{"login":"kleimkuhler","id":4572153,"node_id":"MDQ6VXNlcjQ1NzIxNTM=","avatar_url":"https://avatars2.githubusercontent.com/u/4572153?v=4","gravatar_id":"","url":"https://api.github.com/users/kleimkuhler","html_url":"https://github.com/kleimkuhler","followers_url":"https://api.github.com/users/kleimkuhler/followers","following_url":"https://api.github.com/users/kleimkuhler/following{/other_user}","gists_url":"https://api.github.com/users/kleimkuhler/gists{/gist_id}","starred_url":"https://api.github.com/users/kleimkuhler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kleimkuhler/subscriptions","organizations_url":"https://api.github.com/users/kleimkuhler/orgs","repos_url":"https://api.github.com/users/kleimkuhler/repos","events_url":"https://api.github.com/users/kleimkuhler/events{/privacy}","received_events_url":"https://api.github.com/users/kleimkuhler/received_events","type":"User","site_admin":false},"html_url":"https://github.com/kleimkuhler/rust","description":"A safe, concurrent, practical language.","fork":true,"url":"https://api.github.com/repos/kleimkuhler/rust","forks_url":"https://api.github.com/repos/kleimkuhler/rust/forks","keys_url":"https://api.github.com/repos/kleimkuhler/rust/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kleimkuhler/rust/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kleimkuhler/rust/teams","hooks_url":"https://api.github.com/repos/kleimkuhler/rust/hooks","issue_events_url":"https://api.github.com/repos/kleimkuhler/rust/issues/events{/number}","events_url":"https://api.github.com/repos/kleimkuhler/rust/events","assignees_url":"https://api.github.com/repos/kleimkuhler/rust/assignees{/user}","branches_url":"https://api.github.com/repos/kleimkuhler/rust/branches{/branch}","tags_url":"https://api.github.com/repos/kleimkuhler/rust/tags","blobs_url":"https://api.github.com/repos/kleimkuhler/rust/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kleimkuhler/rust/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kleimkuhler/rust/git/refs{/sha}","trees_url":"https://api.github.com/repos/kleimkuhler/rust/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kleimkuhler/rust/statuses/{sha}","languages_url":"https://api.github.com/repos/kleimkuhler/rust/languages","stargazers_url":"https://api.github.com/repos/kleimkuhler/rust/stargazers","contributors_url":"https://api.github.com/repos/kleimkuhler/rust/contributors","subscribers_url":"https://api.github.com/repos/kleimkuhler/rust/subscribers","subscription_url":"https://api.github.com/repos/kleimkuhler/rust/subscription","commits_url":"https://api.github.com/repos/kleimkuhler/rust/commits{/sha}","git_commits_url":"https://api.github.com/repos/kleimkuhler/rust/git/commits{/sha}","comments_url":"https://api.github.com/repos/kleimkuhler/rust/comments{/number}","issue_comment_url":"https://api.github.com/repos/kleimkuhler/rust/issues/comments{/number}","contents_url":"https://api.github.com/repos/kleimkuhler/rust/contents/{+path}","compare_url":"https://api.github.com/repos/kleimkuhler/rust/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kleimkuhler/rust/merges","archive_url":"https://api.github.com/repos/kleimkuhler/rust/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kleimkuhler/rust/downloads","issues_url":"https://api.github.com/repos/kleimkuhler/rust/issues{/number}","pulls_url":"https://api.github.com/repos/kleimkuhler/rust/pulls{/number}","milestones_url":"https://api.github.com/repos/kleimkuhler/rust/milestones{/number}","notifications_url":"https://api.github.com/repos/kleimkuhler/rust/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kleimkuhler/rust/labels{/name}","releases_url":"https://api.github.com/repos/kleimkuhler/rust/releases{/id}","deployments_url":"https://api.github.com/repos/kleimkuhler/rust/deployments","created_at":"2018-09-24T03:22:04Z","updated_at":"2018-10-22T03:30:47Z","pushed_at":"2018-10-22T03:36:20Z","git_url":"git://github.com/kleimkuhler/rust.git","ssh_url":"git@github.com:kleimkuhler/rust.git","clone_url":"https://github.com/kleimkuhler/rust.git","svn_url":"https://github.com/kleimkuhler/rust","homepage":"https://www.rust-lang.org","size":398865,"stargazers_count":1,"watchers_count":1,"language":"Rust","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"rust-lang:master","ref":"master","sha":"424a749a01224239ba2c8850f16007d57db0a242","user":{"login":"rust-lang","id":5430905,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU0MzA5MDU=","avatar_url":"https://avatars1.githubusercontent.com/u/5430905?v=4","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,"node_id":"MDEwOlJlcG9zaXRvcnk3MjQ3MTI=","name":"rust","full_name":"rust-lang/rust","private":false,"owner":{"login":"rust-lang","id":5430905,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU0MzA5MDU=","avatar_url":"https://avatars1.githubusercontent.com/u/5430905?v=4","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},"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}","deployments_url":"https://api.github.com/repos/rust-lang/rust/deployments","created_at":"2010-06-16T20:39:03Z","updated_at":"2018-10-26T03:03:39Z","pushed_at":"2018-10-26T03:07:55Z","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":"https://www.rust-lang.org","size":399834,"stargazers_count":31314,"watchers_count":31314,"language":"Rust","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":5248,"mirror_url":null,"archived":false,"open_issues_count":4481,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":5248,"open_issues":4481,"watchers":31314,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rust-lang/rust/pulls/55045"},"html":{"href":"https://github.com/rust-lang/rust/pull/55045"},"issue":{"href":"https://api.github.com/repos/rust-lang/rust/issues/55045"},"comments":{"href":"https://api.github.com/repos/rust-lang/rust/issues/55045/comments"},"review_comments":{"href":"https://api.github.com/repos/rust-lang/rust/pulls/55045/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/55045/commits"},"statuses":{"href":"https://api.github.com/repos/rust-lang/rust/statuses/6b46008f24b2681b9d333feb5b52aa619afd962d"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"kleimkuhler"}}