{"action":"created","comment":{"url":"https://api.github.com/repos/rust-lang-nursery/rustc-perf/pulls/comments/73463469","id":73463469,"diff_hunk":"@@ -0,0 +1,37 @@\n+use load::Data;\n+use chrono::NaiveDateTime;\n+\n+/// Return where the passed date is (Ok(usize)) or should go (Err(usize)) in\n+/// the data slice.\n+fn get_insert_location(data: &[Data], date: &NaiveDateTime) -> ::std::result::Result<usize, usize> {","path":"backend/src/util.rs","position":6,"original_position":6,"commit_id":"10a27785c6452c14d5d5d916dbfdedcb971a9efb","original_commit_id":"10a27785c6452c14d5d5d916dbfdedcb971a9efb","user":{"login":"Mark-Simulacrum","id":5047365,"avatar_url":"https://avatars.githubusercontent.com/u/5047365?v=3","gravatar_id":"","url":"https://api.github.com/users/Mark-Simulacrum","html_url":"https://github.com/Mark-Simulacrum","followers_url":"https://api.github.com/users/Mark-Simulacrum/followers","following_url":"https://api.github.com/users/Mark-Simulacrum/following{/other_user}","gists_url":"https://api.github.com/users/Mark-Simulacrum/gists{/gist_id}","starred_url":"https://api.github.com/users/Mark-Simulacrum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mark-Simulacrum/subscriptions","organizations_url":"https://api.github.com/users/Mark-Simulacrum/orgs","repos_url":"https://api.github.com/users/Mark-Simulacrum/repos","events_url":"https://api.github.com/users/Mark-Simulacrum/events{/privacy}","received_events_url":"https://api.github.com/users/Mark-Simulacrum/received_events","type":"User","site_admin":false},"body":"I was tempted, but `find` [to me] implies returning `&Item` (`&Data`) in this case; `position` could work, but since this can return the position where something should go, not where it is, I wasn't too sure.\r\n\r\nAlso, do you think it makes sense to return Result<usize, usize> here? Or would returning usize and doing the if is_ok(), unwrap(), else, unwrap_err() logic in here be better? We perform that logic anyway below near as I can tell.","created_at":"2016-08-04T05:18:00Z","updated_at":"2016-08-04T05:18:00Z","html_url":"https://github.com/rust-lang-nursery/rustc-perf/pull/22#discussion_r73463469","pull_request_url":"https://api.github.com/repos/rust-lang-nursery/rustc-perf/pulls/22","_links":{"self":{"href":"https://api.github.com/repos/rust-lang-nursery/rustc-perf/pulls/comments/73463469"},"html":{"href":"https://github.com/rust-lang-nursery/rustc-perf/pull/22#discussion_r73463469"},"pull_request":{"href":"https://api.github.com/repos/rust-lang-nursery/rustc-perf/pulls/22"}}},"pull_request":{"url":"https://api.github.com/repos/rust-lang-nursery/rustc-perf/pulls/22","id":79981061,"html_url":"https://github.com/rust-lang-nursery/rustc-perf/pull/22","diff_url":"https://github.com/rust-lang-nursery/rustc-perf/pull/22.diff","patch_url":"https://github.com/rust-lang-nursery/rustc-perf/pull/22.patch","issue_url":"https://api.github.com/repos/rust-lang-nursery/rustc-perf/issues/22","number":22,"state":"open","locked":false,"title":"Port NodeJS backend into Rust.","user":{"login":"Mark-Simulacrum","id":5047365,"avatar_url":"https://avatars.githubusercontent.com/u/5047365?v=3","gravatar_id":"","url":"https://api.github.com/users/Mark-Simulacrum","html_url":"https://github.com/Mark-Simulacrum","followers_url":"https://api.github.com/users/Mark-Simulacrum/followers","following_url":"https://api.github.com/users/Mark-Simulacrum/following{/other_user}","gists_url":"https://api.github.com/users/Mark-Simulacrum/gists{/gist_id}","starred_url":"https://api.github.com/users/Mark-Simulacrum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mark-Simulacrum/subscriptions","organizations_url":"https://api.github.com/users/Mark-Simulacrum/orgs","repos_url":"https://api.github.com/users/Mark-Simulacrum/repos","events_url":"https://api.github.com/users/Mark-Simulacrum/events{/privacy}","received_events_url":"https://api.github.com/users/Mark-Simulacrum/received_events","type":"User","site_admin":false},"body":"Removes JS file and replaces backend directory with Rust port.\r\n\r\nFixes: #21.\r\n\r\nRunning list to keep track of future work (@nrc, feel free to add):\r\n - Encode kind (rustc/benchmarks) as an enum throughout the code.","created_at":"2016-08-03T21:19:35Z","updated_at":"2016-08-04T05:18:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"29e71066471a05690f9e870e1491009068fa4645","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/rust-lang-nursery/rustc-perf/pulls/22/commits","review_comments_url":"https://api.github.com/repos/rust-lang-nursery/rustc-perf/pulls/22/comments","review_comment_url":"https://api.github.com/repos/rust-lang-nursery/rustc-perf/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rust-lang-nursery/rustc-perf/issues/22/comments","statuses_url":"https://api.github.com/repos/rust-lang-nursery/rustc-perf/statuses/10a27785c6452c14d5d5d916dbfdedcb971a9efb","head":{"label":"Mark-Simulacrum:rust-port","ref":"rust-port","sha":"10a27785c6452c14d5d5d916dbfdedcb971a9efb","user":{"login":"Mark-Simulacrum","id":5047365,"avatar_url":"https://avatars.githubusercontent.com/u/5047365?v=3","gravatar_id":"","url":"https://api.github.com/users/Mark-Simulacrum","html_url":"https://github.com/Mark-Simulacrum","followers_url":"https://api.github.com/users/Mark-Simulacrum/followers","following_url":"https://api.github.com/users/Mark-Simulacrum/following{/other_user}","gists_url":"https://api.github.com/users/Mark-Simulacrum/gists{/gist_id}","starred_url":"https://api.github.com/users/Mark-Simulacrum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mark-Simulacrum/subscriptions","organizations_url":"https://api.github.com/users/Mark-Simulacrum/orgs","repos_url":"https://api.github.com/users/Mark-Simulacrum/repos","events_url":"https://api.github.com/users/Mark-Simulacrum/events{/privacy}","received_events_url":"https://api.github.com/users/Mark-Simulacrum/received_events","type":"User","site_admin":false},"repo":{"id":64613576,"name":"rustc-perf","full_name":"Mark-Simulacrum/rustc-perf","owner":{"login":"Mark-Simulacrum","id":5047365,"avatar_url":"https://avatars.githubusercontent.com/u/5047365?v=3","gravatar_id":"","url":"https://api.github.com/users/Mark-Simulacrum","html_url":"https://github.com/Mark-Simulacrum","followers_url":"https://api.github.com/users/Mark-Simulacrum/followers","following_url":"https://api.github.com/users/Mark-Simulacrum/following{/other_user}","gists_url":"https://api.github.com/users/Mark-Simulacrum/gists{/gist_id}","starred_url":"https://api.github.com/users/Mark-Simulacrum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mark-Simulacrum/subscriptions","organizations_url":"https://api.github.com/users/Mark-Simulacrum/orgs","repos_url":"https://api.github.com/users/Mark-Simulacrum/repos","events_url":"https://api.github.com/users/Mark-Simulacrum/events{/privacy}","received_events_url":"https://api.github.com/users/Mark-Simulacrum/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Mark-Simulacrum/rustc-perf","description":"Website for graphing performance of rustc","fork":true,"url":"https://api.github.com/repos/Mark-Simulacrum/rustc-perf","forks_url":"https://api.github.com/repos/Mark-Simulacrum/rustc-perf/forks","keys_url":"https://api.github.com/repos/Mark-Simulacrum/rustc-perf/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Mark-Simulacrum/rustc-perf/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Mark-Simulacrum/rustc-perf/teams","hooks_url":"https://api.github.com/repos/Mark-Simulacrum/rustc-perf/hooks","issue_events_url":"https://api.github.com/repos/Mark-Simulacrum/rustc-perf/issues/events{/number}","events_url":"https://api.github.com/repos/Mark-Simulacrum/rustc-perf/events","assignees_url":"https://api.github.com/repos/Mark-Simulacrum/rustc-perf/assignees{/user}","branches_url":"https://api.github.com/repos/Mark-Simulacrum/rustc-perf/branches{/branch}","tags_url":"https://api.github.com/repos/Mark-Simulacrum/rustc-perf/tags","blobs_url":"https://api.github.com/repos/Mark-Simulacrum/rustc-perf/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Mark-Simulacrum/rustc-perf/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Mark-Simulacrum/rustc-perf/git/refs{/sha}","trees_url":"https://api.github.com/repos/Mark-Simulacrum/rustc-perf/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Mark-Simulacrum/rustc-perf/statuses/{sha}","languages_url":"https://api.github.com/repos/Mark-Simulacrum/rustc-perf/languages","stargazers_url":"https://api.github.com/repos/Mark-Simulacrum/rustc-perf/stargazers","contributors_url":"https://api.github.com/repos/Mark-Simulacrum/rustc-perf/contributors","subscribers_url":"https://api.github.com/repos/Mark-Simulacrum/rustc-perf/subscribers","subscription_url":"https://api.github.com/repos/Mark-Simulacrum/rustc-perf/subscription","commits_url":"https://api.github.com/repos/Mark-Simulacrum/rustc-perf/commits{/sha}","git_commits_url":"https://api.github.com/repos/Mark-Simulacrum/rustc-perf/git/commits{/sha}","comments_url":"https://api.github.com/repos/Mark-Simulacrum/rustc-perf/comments{/number}","issue_comment_url":"https://api.github.com/repos/Mark-Simulacrum/rustc-perf/issues/comments{/number}","contents_url":"https://api.github.com/repos/Mark-Simulacrum/rustc-perf/contents/{+path}","compare_url":"https://api.github.com/repos/Mark-Simulacrum/rustc-perf/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Mark-Simulacrum/rustc-perf/merges","archive_url":"https://api.github.com/repos/Mark-Simulacrum/rustc-perf/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Mark-Simulacrum/rustc-perf/downloads","issues_url":"https://api.github.com/repos/Mark-Simulacrum/rustc-perf/issues{/number}","pulls_url":"https://api.github.com/repos/Mark-Simulacrum/rustc-perf/pulls{/number}","milestones_url":"https://api.github.com/repos/Mark-Simulacrum/rustc-perf/milestones{/number}","notifications_url":"https://api.github.com/repos/Mark-Simulacrum/rustc-perf/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Mark-Simulacrum/rustc-perf/labels{/name}","releases_url":"https://api.github.com/repos/Mark-Simulacrum/rustc-perf/releases{/id}","deployments_url":"https://api.github.com/repos/Mark-Simulacrum/rustc-perf/deployments","created_at":"2016-07-31T20:23:36Z","updated_at":"2016-07-31T20:23:37Z","pushed_at":"2016-08-04T01:37:28Z","git_url":"git://github.com/Mark-Simulacrum/rustc-perf.git","ssh_url":"git@github.com:Mark-Simulacrum/rustc-perf.git","clone_url":"https://github.com/Mark-Simulacrum/rustc-perf.git","svn_url":"https://github.com/Mark-Simulacrum/rustc-perf","homepage":null,"size":393,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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-nursery:master","ref":"master","sha":"a183625ea5f2dc2b4859199b98a726a2df56009c","user":{"login":"rust-lang-nursery","id":14631425,"avatar_url":"https://avatars.githubusercontent.com/u/14631425?v=3","gravatar_id":"","url":"https://api.github.com/users/rust-lang-nursery","html_url":"https://github.com/rust-lang-nursery","followers_url":"https://api.github.com/users/rust-lang-nursery/followers","following_url":"https://api.github.com/users/rust-lang-nursery/following{/other_user}","gists_url":"https://api.github.com/users/rust-lang-nursery/gists{/gist_id}","starred_url":"https://api.github.com/users/rust-lang-nursery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rust-lang-nursery/subscriptions","organizations_url":"https://api.github.com/users/rust-lang-nursery/orgs","repos_url":"https://api.github.com/users/rust-lang-nursery/repos","events_url":"https://api.github.com/users/rust-lang-nursery/events{/privacy}","received_events_url":"https://api.github.com/users/rust-lang-nursery/received_events","type":"Organization","site_admin":false},"repo":{"id":31149031,"name":"rustc-perf","full_name":"rust-lang-nursery/rustc-perf","owner":{"login":"rust-lang-nursery","id":14631425,"avatar_url":"https://avatars.githubusercontent.com/u/14631425?v=3","gravatar_id":"","url":"https://api.github.com/users/rust-lang-nursery","html_url":"https://github.com/rust-lang-nursery","followers_url":"https://api.github.com/users/rust-lang-nursery/followers","following_url":"https://api.github.com/users/rust-lang-nursery/following{/other_user}","gists_url":"https://api.github.com/users/rust-lang-nursery/gists{/gist_id}","starred_url":"https://api.github.com/users/rust-lang-nursery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rust-lang-nursery/subscriptions","organizations_url":"https://api.github.com/users/rust-lang-nursery/orgs","repos_url":"https://api.github.com/users/rust-lang-nursery/repos","events_url":"https://api.github.com/users/rust-lang-nursery/events{/privacy}","received_events_url":"https://api.github.com/users/rust-lang-nursery/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rust-lang-nursery/rustc-perf","description":"Website for graphing performance of rustc","fork":false,"url":"https://api.github.com/repos/rust-lang-nursery/rustc-perf","forks_url":"https://api.github.com/repos/rust-lang-nursery/rustc-perf/forks","keys_url":"https://api.github.com/repos/rust-lang-nursery/rustc-perf/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rust-lang-nursery/rustc-perf/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rust-lang-nursery/rustc-perf/teams","hooks_url":"https://api.github.com/repos/rust-lang-nursery/rustc-perf/hooks","issue_events_url":"https://api.github.com/repos/rust-lang-nursery/rustc-perf/issues/events{/number}","events_url":"https://api.github.com/repos/rust-lang-nursery/rustc-perf/events","assignees_url":"https://api.github.com/repos/rust-lang-nursery/rustc-perf/assignees{/user}","branches_url":"https://api.github.com/repos/rust-lang-nursery/rustc-perf/branches{/branch}","tags_url":"https://api.github.com/repos/rust-lang-nursery/rustc-perf/tags","blobs_url":"https://api.github.com/repos/rust-lang-nursery/rustc-perf/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rust-lang-nursery/rustc-perf/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rust-lang-nursery/rustc-perf/git/refs{/sha}","trees_url":"https://api.github.com/repos/rust-lang-nursery/rustc-perf/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rust-lang-nursery/rustc-perf/statuses/{sha}","languages_url":"https://api.github.com/repos/rust-lang-nursery/rustc-perf/languages","stargazers_url":"https://api.github.com/repos/rust-lang-nursery/rustc-perf/stargazers","contributors_url":"https://api.github.com/repos/rust-lang-nursery/rustc-perf/contributors","subscribers_url":"https://api.github.com/repos/rust-lang-nursery/rustc-perf/subscribers","subscription_url":"https://api.github.com/repos/rust-lang-nursery/rustc-perf/subscription","commits_url":"https://api.github.com/repos/rust-lang-nursery/rustc-perf/commits{/sha}","git_commits_url":"https://api.github.com/repos/rust-lang-nursery/rustc-perf/git/commits{/sha}","comments_url":"https://api.github.com/repos/rust-lang-nursery/rustc-perf/comments{/number}","issue_comment_url":"https://api.github.com/repos/rust-lang-nursery/rustc-perf/issues/comments{/number}","contents_url":"https://api.github.com/repos/rust-lang-nursery/rustc-perf/contents/{+path}","compare_url":"https://api.github.com/repos/rust-lang-nursery/rustc-perf/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rust-lang-nursery/rustc-perf/merges","archive_url":"https://api.github.com/repos/rust-lang-nursery/rustc-perf/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rust-lang-nursery/rustc-perf/downloads","issues_url":"https://api.github.com/repos/rust-lang-nursery/rustc-perf/issues{/number}","pulls_url":"https://api.github.com/repos/rust-lang-nursery/rustc-perf/pulls{/number}","milestones_url":"https://api.github.com/repos/rust-lang-nursery/rustc-perf/milestones{/number}","notifications_url":"https://api.github.com/repos/rust-lang-nursery/rustc-perf/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rust-lang-nursery/rustc-perf/labels{/name}","releases_url":"https://api.github.com/repos/rust-lang-nursery/rustc-perf/releases{/id}","deployments_url":"https://api.github.com/repos/rust-lang-nursery/rustc-perf/deployments","created_at":"2015-02-22T02:04:12Z","updated_at":"2016-08-02T18:03:25Z","pushed_at":"2016-08-04T00:59:11Z","git_url":"git://github.com/rust-lang-nursery/rustc-perf.git","ssh_url":"git@github.com:rust-lang-nursery/rustc-perf.git","clone_url":"https://github.com/rust-lang-nursery/rustc-perf.git","svn_url":"https://github.com/rust-lang-nursery/rustc-perf","homepage":null,"size":339,"stargazers_count":4,"watchers_count":4,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":11,"forks":4,"open_issues":11,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rust-lang-nursery/rustc-perf/pulls/22"},"html":{"href":"https://github.com/rust-lang-nursery/rustc-perf/pull/22"},"issue":{"href":"https://api.github.com/repos/rust-lang-nursery/rustc-perf/issues/22"},"comments":{"href":"https://api.github.com/repos/rust-lang-nursery/rustc-perf/issues/22/comments"},"review_comments":{"href":"https://api.github.com/repos/rust-lang-nursery/rustc-perf/pulls/22/comments"},"review_comment":{"href":"https://api.github.com/repos/rust-lang-nursery/rustc-perf/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rust-lang-nursery/rustc-perf/pulls/22/commits"},"statuses":{"href":"https://api.github.com/repos/rust-lang-nursery/rustc-perf/statuses/10a27785c6452c14d5d5d916dbfdedcb971a9efb"}}}}
{"actor":{"display_login":"Mark-Simulacrum"}}