{"action":"created","comment":{"url":"https://api.github.com/repos/rust-lang/cargo/pulls/comments/46183393","id":46183393,"diff_hunk":"@@ -561,6 +586,23 @@ impl TomlManifest {\n     }\n }\n \n+/// Will check a list of strings, and make sure they're unique within a vector. If not, the name of\n+/// the offending binary is returned.\n+fn are_unique_names(values: &Vec<String>) -> Result<(), String> {\n+    use std::collections::HashSet;\n+    let mut seen: HashSet<&String> = HashSet::new();","path":"src/cargo/util/toml.rs","position":40,"original_position":40,"commit_id":"0dfe903b195add2dfe0010073da0d1a641bfd8e6","original_commit_id":"0dfe903b195add2dfe0010073da0d1a641bfd8e6","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":"You can eschew the type annotation here","created_at":"2015-11-30T18:40:17Z","updated_at":"2015-11-30T18:40:17Z","html_url":"https://github.com/rust-lang/cargo/pull/2165#discussion_r46183393","pull_request_url":"https://api.github.com/repos/rust-lang/cargo/pulls/2165","_links":{"self":{"href":"https://api.github.com/repos/rust-lang/cargo/pulls/comments/46183393"},"html":{"href":"https://github.com/rust-lang/cargo/pull/2165#discussion_r46183393"},"pull_request":{"href":"https://api.github.com/repos/rust-lang/cargo/pulls/2165"}}},"pull_request":{"url":"https://api.github.com/repos/rust-lang/cargo/pulls/2165","id":51481095,"html_url":"https://github.com/rust-lang/cargo/pull/2165","diff_url":"https://github.com/rust-lang/cargo/pull/2165.diff","patch_url":"https://github.com/rust-lang/cargo/pull/2165.patch","issue_url":"https://api.github.com/repos/rust-lang/cargo/issues/2165","number":2165,"state":"open","locked":false,"title":"Fix 2125 dup bins","user":{"login":"psyomn","id":505688,"avatar_url":"https://avatars.githubusercontent.com/u/505688?v=3","gravatar_id":"","url":"https://api.github.com/users/psyomn","html_url":"https://github.com/psyomn","followers_url":"https://api.github.com/users/psyomn/followers","following_url":"https://api.github.com/users/psyomn/following{/other_user}","gists_url":"https://api.github.com/users/psyomn/gists{/gist_id}","starred_url":"https://api.github.com/users/psyomn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/psyomn/subscriptions","organizations_url":"https://api.github.com/users/psyomn/orgs","repos_url":"https://api.github.com/users/psyomn/repos","events_url":"https://api.github.com/users/psyomn/events{/privacy}","received_events_url":"https://api.github.com/users/psyomn/received_events","type":"User","site_admin":false},"body":"Alex, thank you for directing me to the right way. \r\n\r\nI did some changes, and made it bail with the following message if duplicate binaries are detected:\r\n\r\n````nocode\r\nfailed to parse manifest at `/home/psyomn/programming/rust/fork/badproj/Cargo.toml`\r\n\r\nCaused by:\r\n  rejected binary name e: only unique binary names are accepted\r\n````\r\n\r\nI also added a test to check for this! Let me know if anything needs fixing.\r\n\r\nref #2125 ","created_at":"2015-11-23T01:15:34Z","updated_at":"2015-11-30T18:40:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"33e46771030a01560af54d4eb9f8fdc967c3a6ec","assignee":{"login":"huonw","id":1203825,"avatar_url":"https://avatars.githubusercontent.com/u/1203825?v=3","gravatar_id":"","url":"https://api.github.com/users/huonw","html_url":"https://github.com/huonw","followers_url":"https://api.github.com/users/huonw/followers","following_url":"https://api.github.com/users/huonw/following{/other_user}","gists_url":"https://api.github.com/users/huonw/gists{/gist_id}","starred_url":"https://api.github.com/users/huonw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/huonw/subscriptions","organizations_url":"https://api.github.com/users/huonw/orgs","repos_url":"https://api.github.com/users/huonw/repos","events_url":"https://api.github.com/users/huonw/events{/privacy}","received_events_url":"https://api.github.com/users/huonw/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/rust-lang/cargo/pulls/2165/commits","review_comments_url":"https://api.github.com/repos/rust-lang/cargo/pulls/2165/comments","review_comment_url":"https://api.github.com/repos/rust-lang/cargo/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rust-lang/cargo/issues/2165/comments","statuses_url":"https://api.github.com/repos/rust-lang/cargo/statuses/0dfe903b195add2dfe0010073da0d1a641bfd8e6","head":{"label":"psyomn:fix-2125-dup-bins","ref":"fix-2125-dup-bins","sha":"0dfe903b195add2dfe0010073da0d1a641bfd8e6","user":{"login":"psyomn","id":505688,"avatar_url":"https://avatars.githubusercontent.com/u/505688?v=3","gravatar_id":"","url":"https://api.github.com/users/psyomn","html_url":"https://github.com/psyomn","followers_url":"https://api.github.com/users/psyomn/followers","following_url":"https://api.github.com/users/psyomn/following{/other_user}","gists_url":"https://api.github.com/users/psyomn/gists{/gist_id}","starred_url":"https://api.github.com/users/psyomn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/psyomn/subscriptions","organizations_url":"https://api.github.com/users/psyomn/orgs","repos_url":"https://api.github.com/users/psyomn/repos","events_url":"https://api.github.com/users/psyomn/events{/privacy}","received_events_url":"https://api.github.com/users/psyomn/received_events","type":"User","site_admin":false},"repo":{"id":46688047,"name":"cargo","full_name":"psyomn/cargo","owner":{"login":"psyomn","id":505688,"avatar_url":"https://avatars.githubusercontent.com/u/505688?v=3","gravatar_id":"","url":"https://api.github.com/users/psyomn","html_url":"https://github.com/psyomn","followers_url":"https://api.github.com/users/psyomn/followers","following_url":"https://api.github.com/users/psyomn/following{/other_user}","gists_url":"https://api.github.com/users/psyomn/gists{/gist_id}","starred_url":"https://api.github.com/users/psyomn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/psyomn/subscriptions","organizations_url":"https://api.github.com/users/psyomn/orgs","repos_url":"https://api.github.com/users/psyomn/repos","events_url":"https://api.github.com/users/psyomn/events{/privacy}","received_events_url":"https://api.github.com/users/psyomn/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/psyomn/cargo","description":"The Rust package manager","fork":true,"url":"https://api.github.com/repos/psyomn/cargo","forks_url":"https://api.github.com/repos/psyomn/cargo/forks","keys_url":"https://api.github.com/repos/psyomn/cargo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/psyomn/cargo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/psyomn/cargo/teams","hooks_url":"https://api.github.com/repos/psyomn/cargo/hooks","issue_events_url":"https://api.github.com/repos/psyomn/cargo/issues/events{/number}","events_url":"https://api.github.com/repos/psyomn/cargo/events","assignees_url":"https://api.github.com/repos/psyomn/cargo/assignees{/user}","branches_url":"https://api.github.com/repos/psyomn/cargo/branches{/branch}","tags_url":"https://api.github.com/repos/psyomn/cargo/tags","blobs_url":"https://api.github.com/repos/psyomn/cargo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/psyomn/cargo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/psyomn/cargo/git/refs{/sha}","trees_url":"https://api.github.com/repos/psyomn/cargo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/psyomn/cargo/statuses/{sha}","languages_url":"https://api.github.com/repos/psyomn/cargo/languages","stargazers_url":"https://api.github.com/repos/psyomn/cargo/stargazers","contributors_url":"https://api.github.com/repos/psyomn/cargo/contributors","subscribers_url":"https://api.github.com/repos/psyomn/cargo/subscribers","subscription_url":"https://api.github.com/repos/psyomn/cargo/subscription","commits_url":"https://api.github.com/repos/psyomn/cargo/commits{/sha}","git_commits_url":"https://api.github.com/repos/psyomn/cargo/git/commits{/sha}","comments_url":"https://api.github.com/repos/psyomn/cargo/comments{/number}","issue_comment_url":"https://api.github.com/repos/psyomn/cargo/issues/comments{/number}","contents_url":"https://api.github.com/repos/psyomn/cargo/contents/{+path}","compare_url":"https://api.github.com/repos/psyomn/cargo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/psyomn/cargo/merges","archive_url":"https://api.github.com/repos/psyomn/cargo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/psyomn/cargo/downloads","issues_url":"https://api.github.com/repos/psyomn/cargo/issues{/number}","pulls_url":"https://api.github.com/repos/psyomn/cargo/pulls{/number}","milestones_url":"https://api.github.com/repos/psyomn/cargo/milestones{/number}","notifications_url":"https://api.github.com/repos/psyomn/cargo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/psyomn/cargo/labels{/name}","releases_url":"https://api.github.com/repos/psyomn/cargo/releases{/id}","created_at":"2015-11-23T00:44:23Z","updated_at":"2015-11-23T00:44:25Z","pushed_at":"2015-11-27T10:40:53Z","git_url":"git://github.com/psyomn/cargo.git","ssh_url":"git@github.com:psyomn/cargo.git","clone_url":"https://github.com/psyomn/cargo.git","svn_url":"https://github.com/psyomn/cargo","homepage":"http://crates.io/","size":8901,"stargazers_count":0,"watchers_count":0,"language":"Rust","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"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":"79cb82da03c4243bd68b1e79b955df4aa62f2cb9","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":17420913,"name":"cargo","full_name":"rust-lang/cargo","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/cargo","description":"The Rust package manager","fork":false,"url":"https://api.github.com/repos/rust-lang/cargo","forks_url":"https://api.github.com/repos/rust-lang/cargo/forks","keys_url":"https://api.github.com/repos/rust-lang/cargo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rust-lang/cargo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rust-lang/cargo/teams","hooks_url":"https://api.github.com/repos/rust-lang/cargo/hooks","issue_events_url":"https://api.github.com/repos/rust-lang/cargo/issues/events{/number}","events_url":"https://api.github.com/repos/rust-lang/cargo/events","assignees_url":"https://api.github.com/repos/rust-lang/cargo/assignees{/user}","branches_url":"https://api.github.com/repos/rust-lang/cargo/branches{/branch}","tags_url":"https://api.github.com/repos/rust-lang/cargo/tags","blobs_url":"https://api.github.com/repos/rust-lang/cargo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rust-lang/cargo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rust-lang/cargo/git/refs{/sha}","trees_url":"https://api.github.com/repos/rust-lang/cargo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rust-lang/cargo/statuses/{sha}","languages_url":"https://api.github.com/repos/rust-lang/cargo/languages","stargazers_url":"https://api.github.com/repos/rust-lang/cargo/stargazers","contributors_url":"https://api.github.com/repos/rust-lang/cargo/contributors","subscribers_url":"https://api.github.com/repos/rust-lang/cargo/subscribers","subscription_url":"https://api.github.com/repos/rust-lang/cargo/subscription","commits_url":"https://api.github.com/repos/rust-lang/cargo/commits{/sha}","git_commits_url":"https://api.github.com/repos/rust-lang/cargo/git/commits{/sha}","comments_url":"https://api.github.com/repos/rust-lang/cargo/comments{/number}","issue_comment_url":"https://api.github.com/repos/rust-lang/cargo/issues/comments{/number}","contents_url":"https://api.github.com/repos/rust-lang/cargo/contents/{+path}","compare_url":"https://api.github.com/repos/rust-lang/cargo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rust-lang/cargo/merges","archive_url":"https://api.github.com/repos/rust-lang/cargo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rust-lang/cargo/downloads","issues_url":"https://api.github.com/repos/rust-lang/cargo/issues{/number}","pulls_url":"https://api.github.com/repos/rust-lang/cargo/pulls{/number}","milestones_url":"https://api.github.com/repos/rust-lang/cargo/milestones{/number}","notifications_url":"https://api.github.com/repos/rust-lang/cargo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rust-lang/cargo/labels{/name}","releases_url":"https://api.github.com/repos/rust-lang/cargo/releases{/id}","created_at":"2014-03-04T23:20:42Z","updated_at":"2015-11-30T17:20:33Z","pushed_at":"2015-11-30T18:31:41Z","git_url":"git://github.com/rust-lang/cargo.git","ssh_url":"git@github.com:rust-lang/cargo.git","clone_url":"https://github.com/rust-lang/cargo.git","svn_url":"https://github.com/rust-lang/cargo","homepage":"http://crates.io/","size":21621,"stargazers_count":1399,"watchers_count":1399,"language":"Rust","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":310,"mirror_url":null,"open_issues_count":192,"forks":310,"open_issues":192,"watchers":1399,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rust-lang/cargo/pulls/2165"},"html":{"href":"https://github.com/rust-lang/cargo/pull/2165"},"issue":{"href":"https://api.github.com/repos/rust-lang/cargo/issues/2165"},"comments":{"href":"https://api.github.com/repos/rust-lang/cargo/issues/2165/comments"},"review_comments":{"href":"https://api.github.com/repos/rust-lang/cargo/pulls/2165/comments"},"review_comment":{"href":"https://api.github.com/repos/rust-lang/cargo/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rust-lang/cargo/pulls/2165/commits"},"statuses":{"href":"https://api.github.com/repos/rust-lang/cargo/statuses/0dfe903b195add2dfe0010073da0d1a641bfd8e6"}}}}