{"action":"created","comment":{"url":"https://api.github.com/repos/capitainetrain/csa-challenge/pulls/comments/38295872","id":38295872,"diff_hunk":"@@ -0,0 +1,134 @@\n+use std::io;\n+\n+const MAX_STATIONS: usize = 100000;\n+\n+#[derive(Debug)]\n+struct Connection {\n+    departure_station: usize,\n+    arrival_station: usize,\n+    departure_timestamp: u32,\n+    arrival_timestamp: u32\n+}\n+\n+impl Connection {\n+    fn parse(line: String) -> Connection {\n+        let splitted = line.split(\" \")\n+            .map(|bite| {\n+                bite.parse()\n+                    .ok()\n+                    .expect(&format!(\"failed to read {} as integer\", bite))\n+            })\n+            .collect::<Vec<u32>>();\n+        \n+        Connection {\n+            departure_station: splitted[0] as usize,\n+            arrival_station: splitted[1] as usize,","path":"csa.rs","position":25,"original_position":25,"commit_id":"483161bfa86b81e55c5471c6c0956b1dc7c653f3","original_commit_id":"483161bfa86b81e55c5471c6c0956b1dc7c653f3","user":{"login":"TeXitoi","id":5787066,"avatar_url":"https://avatars.githubusercontent.com/u/5787066?v=3","gravatar_id":"","url":"https://api.github.com/users/TeXitoi","html_url":"https://github.com/TeXitoi","followers_url":"https://api.github.com/users/TeXitoi/followers","following_url":"https://api.github.com/users/TeXitoi/following{/other_user}","gists_url":"https://api.github.com/users/TeXitoi/gists{/gist_id}","starred_url":"https://api.github.com/users/TeXitoi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TeXitoi/subscriptions","organizations_url":"https://api.github.com/users/TeXitoi/orgs","repos_url":"https://api.github.com/users/TeXitoi/repos","events_url":"https://api.github.com/users/TeXitoi/events{/privacy}","received_events_url":"https://api.github.com/users/TeXitoi/received_events","type":"User","site_admin":false},"body":"Why not just use directly `u32` then?","created_at":"2015-08-31T09:15:05Z","updated_at":"2015-08-31T09:15:05Z","html_url":"https://github.com/capitainetrain/csa-challenge/pull/8#discussion_r38295872","pull_request_url":"https://api.github.com/repos/capitainetrain/csa-challenge/pulls/8","_links":{"self":{"href":"https://api.github.com/repos/capitainetrain/csa-challenge/pulls/comments/38295872"},"html":{"href":"https://github.com/capitainetrain/csa-challenge/pull/8#discussion_r38295872"},"pull_request":{"href":"https://api.github.com/repos/capitainetrain/csa-challenge/pulls/8"}}},"pull_request":{"url":"https://api.github.com/repos/capitainetrain/csa-challenge/pulls/8","id":43719101,"html_url":"https://github.com/capitainetrain/csa-challenge/pull/8","diff_url":"https://github.com/capitainetrain/csa-challenge/pull/8.diff","patch_url":"https://github.com/capitainetrain/csa-challenge/pull/8.patch","issue_url":"https://api.github.com/repos/capitainetrain/csa-challenge/issues/8","number":8,"state":"open","locked":false,"title":"Add a simple Rust version to the mix","user":{"login":"Signez","id":411336,"avatar_url":"https://avatars.githubusercontent.com/u/411336?v=3","gravatar_id":"","url":"https://api.github.com/users/Signez","html_url":"https://github.com/Signez","followers_url":"https://api.github.com/users/Signez/followers","following_url":"https://api.github.com/users/Signez/following{/other_user}","gists_url":"https://api.github.com/users/Signez/gists{/gist_id}","starred_url":"https://api.github.com/users/Signez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Signez/subscriptions","organizations_url":"https://api.github.com/users/Signez/orgs","repos_url":"https://api.github.com/users/Signez/repos","events_url":"https://api.github.com/users/Signez/events{/privacy}","received_events_url":"https://api.github.com/users/Signez/received_events","type":"User","site_admin":false},"body":"Probably not the best in town, but it seems to have correct perfs (near C++).","created_at":"2015-08-30T19:47:01Z","updated_at":"2015-08-31T09:15:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"eacf6fd36b885e8c599018f2415bcb86eb9b39f7","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/capitainetrain/csa-challenge/pulls/8/commits","review_comments_url":"https://api.github.com/repos/capitainetrain/csa-challenge/pulls/8/comments","review_comment_url":"https://api.github.com/repos/capitainetrain/csa-challenge/pulls/comments{/number}","comments_url":"https://api.github.com/repos/capitainetrain/csa-challenge/issues/8/comments","statuses_url":"https://api.github.com/repos/capitainetrain/csa-challenge/statuses/483161bfa86b81e55c5471c6c0956b1dc7c653f3","head":{"label":"Signez:rust","ref":"rust","sha":"483161bfa86b81e55c5471c6c0956b1dc7c653f3","user":{"login":"Signez","id":411336,"avatar_url":"https://avatars.githubusercontent.com/u/411336?v=3","gravatar_id":"","url":"https://api.github.com/users/Signez","html_url":"https://github.com/Signez","followers_url":"https://api.github.com/users/Signez/followers","following_url":"https://api.github.com/users/Signez/following{/other_user}","gists_url":"https://api.github.com/users/Signez/gists{/gist_id}","starred_url":"https://api.github.com/users/Signez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Signez/subscriptions","organizations_url":"https://api.github.com/users/Signez/orgs","repos_url":"https://api.github.com/users/Signez/repos","events_url":"https://api.github.com/users/Signez/events{/privacy}","received_events_url":"https://api.github.com/users/Signez/received_events","type":"User","site_admin":false},"repo":{"id":40829401,"name":"csa-challenge","full_name":"Signez/csa-challenge","owner":{"login":"Signez","id":411336,"avatar_url":"https://avatars.githubusercontent.com/u/411336?v=3","gravatar_id":"","url":"https://api.github.com/users/Signez","html_url":"https://github.com/Signez","followers_url":"https://api.github.com/users/Signez/followers","following_url":"https://api.github.com/users/Signez/following{/other_user}","gists_url":"https://api.github.com/users/Signez/gists{/gist_id}","starred_url":"https://api.github.com/users/Signez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Signez/subscriptions","organizations_url":"https://api.github.com/users/Signez/orgs","repos_url":"https://api.github.com/users/Signez/repos","events_url":"https://api.github.com/users/Signez/events{/privacy}","received_events_url":"https://api.github.com/users/Signez/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Signez/csa-challenge","description":"Compare various implementations of the contractions scan algorithm","fork":true,"url":"https://api.github.com/repos/Signez/csa-challenge","forks_url":"https://api.github.com/repos/Signez/csa-challenge/forks","keys_url":"https://api.github.com/repos/Signez/csa-challenge/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Signez/csa-challenge/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Signez/csa-challenge/teams","hooks_url":"https://api.github.com/repos/Signez/csa-challenge/hooks","issue_events_url":"https://api.github.com/repos/Signez/csa-challenge/issues/events{/number}","events_url":"https://api.github.com/repos/Signez/csa-challenge/events","assignees_url":"https://api.github.com/repos/Signez/csa-challenge/assignees{/user}","branches_url":"https://api.github.com/repos/Signez/csa-challenge/branches{/branch}","tags_url":"https://api.github.com/repos/Signez/csa-challenge/tags","blobs_url":"https://api.github.com/repos/Signez/csa-challenge/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Signez/csa-challenge/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Signez/csa-challenge/git/refs{/sha}","trees_url":"https://api.github.com/repos/Signez/csa-challenge/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Signez/csa-challenge/statuses/{sha}","languages_url":"https://api.github.com/repos/Signez/csa-challenge/languages","stargazers_url":"https://api.github.com/repos/Signez/csa-challenge/stargazers","contributors_url":"https://api.github.com/repos/Signez/csa-challenge/contributors","subscribers_url":"https://api.github.com/repos/Signez/csa-challenge/subscribers","subscription_url":"https://api.github.com/repos/Signez/csa-challenge/subscription","commits_url":"https://api.github.com/repos/Signez/csa-challenge/commits{/sha}","git_commits_url":"https://api.github.com/repos/Signez/csa-challenge/git/commits{/sha}","comments_url":"https://api.github.com/repos/Signez/csa-challenge/comments{/number}","issue_comment_url":"https://api.github.com/repos/Signez/csa-challenge/issues/comments{/number}","contents_url":"https://api.github.com/repos/Signez/csa-challenge/contents/{+path}","compare_url":"https://api.github.com/repos/Signez/csa-challenge/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Signez/csa-challenge/merges","archive_url":"https://api.github.com/repos/Signez/csa-challenge/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Signez/csa-challenge/downloads","issues_url":"https://api.github.com/repos/Signez/csa-challenge/issues{/number}","pulls_url":"https://api.github.com/repos/Signez/csa-challenge/pulls{/number}","milestones_url":"https://api.github.com/repos/Signez/csa-challenge/milestones{/number}","notifications_url":"https://api.github.com/repos/Signez/csa-challenge/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Signez/csa-challenge/labels{/name}","releases_url":"https://api.github.com/repos/Signez/csa-challenge/releases{/id}","created_at":"2015-08-16T17:08:00Z","updated_at":"2015-08-16T17:08:00Z","pushed_at":"2015-08-30T19:45:58Z","git_url":"git://github.com/Signez/csa-challenge.git","ssh_url":"git@github.com:Signez/csa-challenge.git","clone_url":"https://github.com/Signez/csa-challenge.git","svn_url":"https://github.com/Signez/csa-challenge","homepage":null,"size":29835,"stargazers_count":0,"watchers_count":0,"language":"Ruby","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":"capitainetrain:master","ref":"master","sha":"efb4234114a5b43c2b6572aa29d3e3398f0218cd","user":{"login":"capitainetrain","id":490555,"avatar_url":"https://avatars.githubusercontent.com/u/490555?v=3","gravatar_id":"","url":"https://api.github.com/users/capitainetrain","html_url":"https://github.com/capitainetrain","followers_url":"https://api.github.com/users/capitainetrain/followers","following_url":"https://api.github.com/users/capitainetrain/following{/other_user}","gists_url":"https://api.github.com/users/capitainetrain/gists{/gist_id}","starred_url":"https://api.github.com/users/capitainetrain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/capitainetrain/subscriptions","organizations_url":"https://api.github.com/users/capitainetrain/orgs","repos_url":"https://api.github.com/users/capitainetrain/repos","events_url":"https://api.github.com/users/capitainetrain/events{/privacy}","received_events_url":"https://api.github.com/users/capitainetrain/received_events","type":"Organization","site_admin":false},"repo":{"id":40717391,"name":"csa-challenge","full_name":"capitainetrain/csa-challenge","owner":{"login":"capitainetrain","id":490555,"avatar_url":"https://avatars.githubusercontent.com/u/490555?v=3","gravatar_id":"","url":"https://api.github.com/users/capitainetrain","html_url":"https://github.com/capitainetrain","followers_url":"https://api.github.com/users/capitainetrain/followers","following_url":"https://api.github.com/users/capitainetrain/following{/other_user}","gists_url":"https://api.github.com/users/capitainetrain/gists{/gist_id}","starred_url":"https://api.github.com/users/capitainetrain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/capitainetrain/subscriptions","organizations_url":"https://api.github.com/users/capitainetrain/orgs","repos_url":"https://api.github.com/users/capitainetrain/repos","events_url":"https://api.github.com/users/capitainetrain/events{/privacy}","received_events_url":"https://api.github.com/users/capitainetrain/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/capitainetrain/csa-challenge","description":"Compare various implementations of the connections scan algorithm","fork":false,"url":"https://api.github.com/repos/capitainetrain/csa-challenge","forks_url":"https://api.github.com/repos/capitainetrain/csa-challenge/forks","keys_url":"https://api.github.com/repos/capitainetrain/csa-challenge/keys{/key_id}","collaborators_url":"https://api.github.com/repos/capitainetrain/csa-challenge/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/capitainetrain/csa-challenge/teams","hooks_url":"https://api.github.com/repos/capitainetrain/csa-challenge/hooks","issue_events_url":"https://api.github.com/repos/capitainetrain/csa-challenge/issues/events{/number}","events_url":"https://api.github.com/repos/capitainetrain/csa-challenge/events","assignees_url":"https://api.github.com/repos/capitainetrain/csa-challenge/assignees{/user}","branches_url":"https://api.github.com/repos/capitainetrain/csa-challenge/branches{/branch}","tags_url":"https://api.github.com/repos/capitainetrain/csa-challenge/tags","blobs_url":"https://api.github.com/repos/capitainetrain/csa-challenge/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/capitainetrain/csa-challenge/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/capitainetrain/csa-challenge/git/refs{/sha}","trees_url":"https://api.github.com/repos/capitainetrain/csa-challenge/git/trees{/sha}","statuses_url":"https://api.github.com/repos/capitainetrain/csa-challenge/statuses/{sha}","languages_url":"https://api.github.com/repos/capitainetrain/csa-challenge/languages","stargazers_url":"https://api.github.com/repos/capitainetrain/csa-challenge/stargazers","contributors_url":"https://api.github.com/repos/capitainetrain/csa-challenge/contributors","subscribers_url":"https://api.github.com/repos/capitainetrain/csa-challenge/subscribers","subscription_url":"https://api.github.com/repos/capitainetrain/csa-challenge/subscription","commits_url":"https://api.github.com/repos/capitainetrain/csa-challenge/commits{/sha}","git_commits_url":"https://api.github.com/repos/capitainetrain/csa-challenge/git/commits{/sha}","comments_url":"https://api.github.com/repos/capitainetrain/csa-challenge/comments{/number}","issue_comment_url":"https://api.github.com/repos/capitainetrain/csa-challenge/issues/comments{/number}","contents_url":"https://api.github.com/repos/capitainetrain/csa-challenge/contents/{+path}","compare_url":"https://api.github.com/repos/capitainetrain/csa-challenge/compare/{base}...{head}","merges_url":"https://api.github.com/repos/capitainetrain/csa-challenge/merges","archive_url":"https://api.github.com/repos/capitainetrain/csa-challenge/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/capitainetrain/csa-challenge/downloads","issues_url":"https://api.github.com/repos/capitainetrain/csa-challenge/issues{/number}","pulls_url":"https://api.github.com/repos/capitainetrain/csa-challenge/pulls{/number}","milestones_url":"https://api.github.com/repos/capitainetrain/csa-challenge/milestones{/number}","notifications_url":"https://api.github.com/repos/capitainetrain/csa-challenge/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/capitainetrain/csa-challenge/labels{/name}","releases_url":"https://api.github.com/repos/capitainetrain/csa-challenge/releases{/id}","created_at":"2015-08-14T13:53:20Z","updated_at":"2015-08-26T23:46:16Z","pushed_at":"2015-08-30T19:47:01Z","git_url":"git://github.com/capitainetrain/csa-challenge.git","ssh_url":"git@github.com:capitainetrain/csa-challenge.git","clone_url":"https://github.com/capitainetrain/csa-challenge.git","svn_url":"https://github.com/capitainetrain/csa-challenge","homepage":"","size":29930,"stargazers_count":14,"watchers_count":14,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":1,"forks":5,"open_issues":1,"watchers":14,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/capitainetrain/csa-challenge/pulls/8"},"html":{"href":"https://github.com/capitainetrain/csa-challenge/pull/8"},"issue":{"href":"https://api.github.com/repos/capitainetrain/csa-challenge/issues/8"},"comments":{"href":"https://api.github.com/repos/capitainetrain/csa-challenge/issues/8/comments"},"review_comments":{"href":"https://api.github.com/repos/capitainetrain/csa-challenge/pulls/8/comments"},"review_comment":{"href":"https://api.github.com/repos/capitainetrain/csa-challenge/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/capitainetrain/csa-challenge/pulls/8/commits"},"statuses":{"href":"https://api.github.com/repos/capitainetrain/csa-challenge/statuses/483161bfa86b81e55c5471c6c0956b1dc7c653f3"}}}}