{"action":"created","comment":{"url":"https://api.github.com/repos/exercism/xrust/pulls/comments/58776735","id":58776735,"diff_hunk":"@@ -0,0 +1,33 @@\n+pub struct Sieve { limit: usize }\n+\n+impl Sieve {\n+    pub fn new(limit: usize) -> Sieve {\n+        Sieve { limit: limit }\n+    }\n+\n+    pub fn primes(&self) -> Vec<usize> {\n+        let mut primes = (0..self.limit).map ( |x| x + 1).collect::<Vec<usize>>();\n+        let tracker = primes.clone();\n+\n+        for num in tracker {\n+            if !prime(num) {\n+                if num > 1 {\n+                    primes.retain( |&x| x % num != 0);\n+                } else {\n+                    primes.retain( |&x| x > 1);\n+                }\n+            }\n+        }\n+\n+        primes\n+    }\n+\n+}\n+\n+pub fn prime(num: usize) -> bool {","path":"exercises/sieve/example.rs","position":27,"original_position":27,"commit_id":"22904ae6d626bb1b933c8501d3baee88f76d2721","original_commit_id":"22904ae6d626bb1b933c8501d3baee88f76d2721","user":{"login":"IanWhitney","id":12144,"avatar_url":"https://avatars.githubusercontent.com/u/12144?v=3","gravatar_id":"","url":"https://api.github.com/users/IanWhitney","html_url":"https://github.com/IanWhitney","followers_url":"https://api.github.com/users/IanWhitney/followers","following_url":"https://api.github.com/users/IanWhitney/following{/other_user}","gists_url":"https://api.github.com/users/IanWhitney/gists{/gist_id}","starred_url":"https://api.github.com/users/IanWhitney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IanWhitney/subscriptions","organizations_url":"https://api.github.com/users/IanWhitney/orgs","repos_url":"https://api.github.com/users/IanWhitney/repos","events_url":"https://api.github.com/users/IanWhitney/events{/privacy}","received_events_url":"https://api.github.com/users/IanWhitney/received_events","type":"User","site_admin":false},"body":"Let me take a closer look at the algorithm and update my example. Since implementing the algorithm is the main reason for this exercise, I want to make sure the example does it right.","created_at":"2016-04-06T20:33:16Z","updated_at":"2016-04-06T20:33:16Z","html_url":"https://github.com/exercism/xrust/pull/97#discussion_r58776735","pull_request_url":"https://api.github.com/repos/exercism/xrust/pulls/97","_links":{"self":{"href":"https://api.github.com/repos/exercism/xrust/pulls/comments/58776735"},"html":{"href":"https://github.com/exercism/xrust/pull/97#discussion_r58776735"},"pull_request":{"href":"https://api.github.com/repos/exercism/xrust/pulls/97"}}},"pull_request":{"url":"https://api.github.com/repos/exercism/xrust/pulls/97","id":65526764,"html_url":"https://github.com/exercism/xrust/pull/97","diff_url":"https://github.com/exercism/xrust/pull/97.diff","patch_url":"https://github.com/exercism/xrust/pull/97.patch","issue_url":"https://api.github.com/repos/exercism/xrust/issues/97","number":97,"state":"open","locked":false,"title":"Implement Sieve exercise","user":{"login":"IanWhitney","id":12144,"avatar_url":"https://avatars.githubusercontent.com/u/12144?v=3","gravatar_id":"","url":"https://api.github.com/users/IanWhitney","html_url":"https://github.com/IanWhitney","followers_url":"https://api.github.com/users/IanWhitney/followers","following_url":"https://api.github.com/users/IanWhitney/following{/other_user}","gists_url":"https://api.github.com/users/IanWhitney/gists{/gist_id}","starred_url":"https://api.github.com/users/IanWhitney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IanWhitney/subscriptions","organizations_url":"https://api.github.com/users/IanWhitney/orgs","repos_url":"https://api.github.com/users/IanWhitney/repos","events_url":"https://api.github.com/users/IanWhitney/events{/privacy}","received_events_url":"https://api.github.com/users/IanWhitney/received_events","type":"User","site_admin":false},"body":"Tests are from the sieve.json file in xcommon\r\n\r\nhttps://github.com/exercism/x-common/blob/master/sieve.json\r\n\r\nThough I have re-ordered them to follow a path I thought better. Start\r\nwith no primes, then work up to the simplest results (1 and 2), then get\r\nmore complex.\r\n\r\nIn the config.json I've chosen to put this exercise before Allergies. I\r\npicked this spot for two reasons:\r\n\r\n1. It has some interesting iterator usage, which I thought step up after\r\ndoing iterator work in Anagrams, and the folding in Difference of\r\nSquares.\r\n2. I think Allergies comes too early. Or, maybe it just came too early\r\nfor me, as I found it baffling.\r\n\r\nBut I'm flexible on placement. Looking at the other tracks it doesn't\r\nseem to have a consistent spot.","created_at":"2016-04-06T20:01:09Z","updated_at":"2016-04-06T20:33:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"72d429ef60945454e9dcb96a3167b94fa4fef32e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/exercism/xrust/pulls/97/commits","review_comments_url":"https://api.github.com/repos/exercism/xrust/pulls/97/comments","review_comment_url":"https://api.github.com/repos/exercism/xrust/pulls/comments{/number}","comments_url":"https://api.github.com/repos/exercism/xrust/issues/97/comments","statuses_url":"https://api.github.com/repos/exercism/xrust/statuses/22904ae6d626bb1b933c8501d3baee88f76d2721","head":{"label":"IanWhitney:implement_sieve","ref":"implement_sieve","sha":"22904ae6d626bb1b933c8501d3baee88f76d2721","user":{"login":"IanWhitney","id":12144,"avatar_url":"https://avatars.githubusercontent.com/u/12144?v=3","gravatar_id":"","url":"https://api.github.com/users/IanWhitney","html_url":"https://github.com/IanWhitney","followers_url":"https://api.github.com/users/IanWhitney/followers","following_url":"https://api.github.com/users/IanWhitney/following{/other_user}","gists_url":"https://api.github.com/users/IanWhitney/gists{/gist_id}","starred_url":"https://api.github.com/users/IanWhitney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IanWhitney/subscriptions","organizations_url":"https://api.github.com/users/IanWhitney/orgs","repos_url":"https://api.github.com/users/IanWhitney/repos","events_url":"https://api.github.com/users/IanWhitney/events{/privacy}","received_events_url":"https://api.github.com/users/IanWhitney/received_events","type":"User","site_admin":false},"repo":{"id":52799604,"name":"xrust","full_name":"IanWhitney/xrust","owner":{"login":"IanWhitney","id":12144,"avatar_url":"https://avatars.githubusercontent.com/u/12144?v=3","gravatar_id":"","url":"https://api.github.com/users/IanWhitney","html_url":"https://github.com/IanWhitney","followers_url":"https://api.github.com/users/IanWhitney/followers","following_url":"https://api.github.com/users/IanWhitney/following{/other_user}","gists_url":"https://api.github.com/users/IanWhitney/gists{/gist_id}","starred_url":"https://api.github.com/users/IanWhitney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IanWhitney/subscriptions","organizations_url":"https://api.github.com/users/IanWhitney/orgs","repos_url":"https://api.github.com/users/IanWhitney/repos","events_url":"https://api.github.com/users/IanWhitney/events{/privacy}","received_events_url":"https://api.github.com/users/IanWhitney/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/IanWhitney/xrust","description":"Exercism Exercises in Rust","fork":true,"url":"https://api.github.com/repos/IanWhitney/xrust","forks_url":"https://api.github.com/repos/IanWhitney/xrust/forks","keys_url":"https://api.github.com/repos/IanWhitney/xrust/keys{/key_id}","collaborators_url":"https://api.github.com/repos/IanWhitney/xrust/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/IanWhitney/xrust/teams","hooks_url":"https://api.github.com/repos/IanWhitney/xrust/hooks","issue_events_url":"https://api.github.com/repos/IanWhitney/xrust/issues/events{/number}","events_url":"https://api.github.com/repos/IanWhitney/xrust/events","assignees_url":"https://api.github.com/repos/IanWhitney/xrust/assignees{/user}","branches_url":"https://api.github.com/repos/IanWhitney/xrust/branches{/branch}","tags_url":"https://api.github.com/repos/IanWhitney/xrust/tags","blobs_url":"https://api.github.com/repos/IanWhitney/xrust/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/IanWhitney/xrust/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/IanWhitney/xrust/git/refs{/sha}","trees_url":"https://api.github.com/repos/IanWhitney/xrust/git/trees{/sha}","statuses_url":"https://api.github.com/repos/IanWhitney/xrust/statuses/{sha}","languages_url":"https://api.github.com/repos/IanWhitney/xrust/languages","stargazers_url":"https://api.github.com/repos/IanWhitney/xrust/stargazers","contributors_url":"https://api.github.com/repos/IanWhitney/xrust/contributors","subscribers_url":"https://api.github.com/repos/IanWhitney/xrust/subscribers","subscription_url":"https://api.github.com/repos/IanWhitney/xrust/subscription","commits_url":"https://api.github.com/repos/IanWhitney/xrust/commits{/sha}","git_commits_url":"https://api.github.com/repos/IanWhitney/xrust/git/commits{/sha}","comments_url":"https://api.github.com/repos/IanWhitney/xrust/comments{/number}","issue_comment_url":"https://api.github.com/repos/IanWhitney/xrust/issues/comments{/number}","contents_url":"https://api.github.com/repos/IanWhitney/xrust/contents/{+path}","compare_url":"https://api.github.com/repos/IanWhitney/xrust/compare/{base}...{head}","merges_url":"https://api.github.com/repos/IanWhitney/xrust/merges","archive_url":"https://api.github.com/repos/IanWhitney/xrust/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/IanWhitney/xrust/downloads","issues_url":"https://api.github.com/repos/IanWhitney/xrust/issues{/number}","pulls_url":"https://api.github.com/repos/IanWhitney/xrust/pulls{/number}","milestones_url":"https://api.github.com/repos/IanWhitney/xrust/milestones{/number}","notifications_url":"https://api.github.com/repos/IanWhitney/xrust/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/IanWhitney/xrust/labels{/name}","releases_url":"https://api.github.com/repos/IanWhitney/xrust/releases{/id}","deployments_url":"https://api.github.com/repos/IanWhitney/xrust/deployments","created_at":"2016-02-29T14:57:32Z","updated_at":"2016-02-29T14:57:33Z","pushed_at":"2016-04-06T20:00:34Z","git_url":"git://github.com/IanWhitney/xrust.git","ssh_url":"git@github.com:IanWhitney/xrust.git","clone_url":"https://github.com/IanWhitney/xrust.git","svn_url":"https://github.com/IanWhitney/xrust","homepage":null,"size":210,"stargazers_count":0,"watchers_count":0,"language":"Rust","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"exercism:master","ref":"master","sha":"143faeb3a9e5ff1e49c80e7ef80ceaf5d97fa4a1","user":{"login":"exercism","id":5624255,"avatar_url":"https://avatars.githubusercontent.com/u/5624255?v=3","gravatar_id":"","url":"https://api.github.com/users/exercism","html_url":"https://github.com/exercism","followers_url":"https://api.github.com/users/exercism/followers","following_url":"https://api.github.com/users/exercism/following{/other_user}","gists_url":"https://api.github.com/users/exercism/gists{/gist_id}","starred_url":"https://api.github.com/users/exercism/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/exercism/subscriptions","organizations_url":"https://api.github.com/users/exercism/orgs","repos_url":"https://api.github.com/users/exercism/repos","events_url":"https://api.github.com/users/exercism/events{/privacy}","received_events_url":"https://api.github.com/users/exercism/received_events","type":"Organization","site_admin":false},"repo":{"id":17276332,"name":"xrust","full_name":"exercism/xrust","owner":{"login":"exercism","id":5624255,"avatar_url":"https://avatars.githubusercontent.com/u/5624255?v=3","gravatar_id":"","url":"https://api.github.com/users/exercism","html_url":"https://github.com/exercism","followers_url":"https://api.github.com/users/exercism/followers","following_url":"https://api.github.com/users/exercism/following{/other_user}","gists_url":"https://api.github.com/users/exercism/gists{/gist_id}","starred_url":"https://api.github.com/users/exercism/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/exercism/subscriptions","organizations_url":"https://api.github.com/users/exercism/orgs","repos_url":"https://api.github.com/users/exercism/repos","events_url":"https://api.github.com/users/exercism/events{/privacy}","received_events_url":"https://api.github.com/users/exercism/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/exercism/xrust","description":"Exercism Exercises in Rust","fork":false,"url":"https://api.github.com/repos/exercism/xrust","forks_url":"https://api.github.com/repos/exercism/xrust/forks","keys_url":"https://api.github.com/repos/exercism/xrust/keys{/key_id}","collaborators_url":"https://api.github.com/repos/exercism/xrust/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/exercism/xrust/teams","hooks_url":"https://api.github.com/repos/exercism/xrust/hooks","issue_events_url":"https://api.github.com/repos/exercism/xrust/issues/events{/number}","events_url":"https://api.github.com/repos/exercism/xrust/events","assignees_url":"https://api.github.com/repos/exercism/xrust/assignees{/user}","branches_url":"https://api.github.com/repos/exercism/xrust/branches{/branch}","tags_url":"https://api.github.com/repos/exercism/xrust/tags","blobs_url":"https://api.github.com/repos/exercism/xrust/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/exercism/xrust/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/exercism/xrust/git/refs{/sha}","trees_url":"https://api.github.com/repos/exercism/xrust/git/trees{/sha}","statuses_url":"https://api.github.com/repos/exercism/xrust/statuses/{sha}","languages_url":"https://api.github.com/repos/exercism/xrust/languages","stargazers_url":"https://api.github.com/repos/exercism/xrust/stargazers","contributors_url":"https://api.github.com/repos/exercism/xrust/contributors","subscribers_url":"https://api.github.com/repos/exercism/xrust/subscribers","subscription_url":"https://api.github.com/repos/exercism/xrust/subscription","commits_url":"https://api.github.com/repos/exercism/xrust/commits{/sha}","git_commits_url":"https://api.github.com/repos/exercism/xrust/git/commits{/sha}","comments_url":"https://api.github.com/repos/exercism/xrust/comments{/number}","issue_comment_url":"https://api.github.com/repos/exercism/xrust/issues/comments{/number}","contents_url":"https://api.github.com/repos/exercism/xrust/contents/{+path}","compare_url":"https://api.github.com/repos/exercism/xrust/compare/{base}...{head}","merges_url":"https://api.github.com/repos/exercism/xrust/merges","archive_url":"https://api.github.com/repos/exercism/xrust/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/exercism/xrust/downloads","issues_url":"https://api.github.com/repos/exercism/xrust/issues{/number}","pulls_url":"https://api.github.com/repos/exercism/xrust/pulls{/number}","milestones_url":"https://api.github.com/repos/exercism/xrust/milestones{/number}","notifications_url":"https://api.github.com/repos/exercism/xrust/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/exercism/xrust/labels{/name}","releases_url":"https://api.github.com/repos/exercism/xrust/releases{/id}","deployments_url":"https://api.github.com/repos/exercism/xrust/deployments","created_at":"2014-02-28T05:33:52Z","updated_at":"2016-04-06T13:07:08Z","pushed_at":"2016-04-06T20:06:47Z","git_url":"git://github.com/exercism/xrust.git","ssh_url":"git@github.com:exercism/xrust.git","clone_url":"https://github.com/exercism/xrust.git","svn_url":"https://github.com/exercism/xrust","homepage":null,"size":272,"stargazers_count":53,"watchers_count":53,"language":"Rust","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":28,"mirror_url":null,"open_issues_count":3,"forks":28,"open_issues":3,"watchers":53,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/exercism/xrust/pulls/97"},"html":{"href":"https://github.com/exercism/xrust/pull/97"},"issue":{"href":"https://api.github.com/repos/exercism/xrust/issues/97"},"comments":{"href":"https://api.github.com/repos/exercism/xrust/issues/97/comments"},"review_comments":{"href":"https://api.github.com/repos/exercism/xrust/pulls/97/comments"},"review_comment":{"href":"https://api.github.com/repos/exercism/xrust/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/exercism/xrust/pulls/97/commits"},"statuses":{"href":"https://api.github.com/repos/exercism/xrust/statuses/22904ae6d626bb1b933c8501d3baee88f76d2721"}}}}