{"action":"opened","number":1,"pull_request":{"url":"https://api.github.com/repos/jedisct1/rust-zmq/pulls/1","id":27309869,"html_url":"https://github.com/jedisct1/rust-zmq/pull/1","diff_url":"https://github.com/jedisct1/rust-zmq/pull/1.diff","patch_url":"https://github.com/jedisct1/rust-zmq/pull/1.patch","issue_url":"https://api.github.com/repos/jedisct1/rust-zmq/issues/1","number":1,"state":"open","locked":false,"title":"Fix examples for latest rust nightly","user":{"login":"drbawb","id":235438,"avatar_url":"https://avatars.githubusercontent.com/u/235438?v=3","gravatar_id":"","url":"https://api.github.com/users/drbawb","html_url":"https://github.com/drbawb","followers_url":"https://api.github.com/users/drbawb/followers","following_url":"https://api.github.com/users/drbawb/following{/other_user}","gists_url":"https://api.github.com/users/drbawb/gists{/gist_id}","starred_url":"https://api.github.com/users/drbawb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drbawb/subscriptions","organizations_url":"https://api.github.com/users/drbawb/orgs","repos_url":"https://api.github.com/users/drbawb/repos","events_url":"https://api.github.com/users/drbawb/events{/privacy}","received_events_url":"https://api.github.com/users/drbawb/received_events","type":"User","site_admin":false},"body":"I noticed that your fork is mostly up to date for the latest nightly; but when running `cargo test` the examples failed to compile.\r\n\r\nI've been keeping them running on my own fork so I figured I'd create a quick patch.\r\n\r\n---\r\n\r\nThis makes one change to `src/lib.rs` which is needed for the `msgsend.rs` example: it implements `Send` for the Socket type. We have to opt-in to `Send` now because `Socket` contains types from `libc::*` that are not marked as Send.\r\n\r\nI believe this to be safe, per the ZMQ documentation:\r\n\r\n```\r\nThread safety:\r\n\r\nØMQ sockets are not thread safe. Applications MUST NOT use a socket from multiple threads \r\nexcept after migrating a socket from one thread to another with a \"full fence\" memory barrier.\r\n```\r\n\r\nSince Rust threads are spawned w/ closures that own their environment we can reasonably conclude that the `zmq::Socket` is only accessible by one thread at a time in safe Rust.\r\n\r\nNote that this _does not implement Sync_ meaning the Socket cannot be protected by the locking primitives in `std::sync` which would permit multiple threads access to a single zmq::Socket. Again I believe this is in line w/ the intentions laid out by the ZMQ documentation.\r\n","created_at":"2015-01-13T22:15:46Z","updated_at":"2015-01-13T22:15:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/jedisct1/rust-zmq/pulls/1/commits","review_comments_url":"https://api.github.com/repos/jedisct1/rust-zmq/pulls/1/comments","review_comment_url":"https://api.github.com/repos/jedisct1/rust-zmq/pulls/comments/{number}","comments_url":"https://api.github.com/repos/jedisct1/rust-zmq/issues/1/comments","statuses_url":"https://api.github.com/repos/jedisct1/rust-zmq/statuses/8c9484aba01bc131d3b00e90ea0ab3dddbd976f8","head":{"label":"drbawb:feature/fix-examples","ref":"feature/fix-examples","sha":"8c9484aba01bc131d3b00e90ea0ab3dddbd976f8","user":{"login":"drbawb","id":235438,"avatar_url":"https://avatars.githubusercontent.com/u/235438?v=3","gravatar_id":"","url":"https://api.github.com/users/drbawb","html_url":"https://github.com/drbawb","followers_url":"https://api.github.com/users/drbawb/followers","following_url":"https://api.github.com/users/drbawb/following{/other_user}","gists_url":"https://api.github.com/users/drbawb/gists{/gist_id}","starred_url":"https://api.github.com/users/drbawb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drbawb/subscriptions","organizations_url":"https://api.github.com/users/drbawb/orgs","repos_url":"https://api.github.com/users/drbawb/repos","events_url":"https://api.github.com/users/drbawb/events{/privacy}","received_events_url":"https://api.github.com/users/drbawb/received_events","type":"User","site_admin":false},"repo":{"id":21353327,"name":"rust-zmq","full_name":"drbawb/rust-zmq","owner":{"login":"drbawb","id":235438,"avatar_url":"https://avatars.githubusercontent.com/u/235438?v=3","gravatar_id":"","url":"https://api.github.com/users/drbawb","html_url":"https://github.com/drbawb","followers_url":"https://api.github.com/users/drbawb/followers","following_url":"https://api.github.com/users/drbawb/following{/other_user}","gists_url":"https://api.github.com/users/drbawb/gists{/gist_id}","starred_url":"https://api.github.com/users/drbawb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drbawb/subscriptions","organizations_url":"https://api.github.com/users/drbawb/orgs","repos_url":"https://api.github.com/users/drbawb/repos","events_url":"https://api.github.com/users/drbawb/events{/privacy}","received_events_url":"https://api.github.com/users/drbawb/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/drbawb/rust-zmq","description":"Rust zeromq bindings.","fork":true,"url":"https://api.github.com/repos/drbawb/rust-zmq","forks_url":"https://api.github.com/repos/drbawb/rust-zmq/forks","keys_url":"https://api.github.com/repos/drbawb/rust-zmq/keys{/key_id}","collaborators_url":"https://api.github.com/repos/drbawb/rust-zmq/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/drbawb/rust-zmq/teams","hooks_url":"https://api.github.com/repos/drbawb/rust-zmq/hooks","issue_events_url":"https://api.github.com/repos/drbawb/rust-zmq/issues/events{/number}","events_url":"https://api.github.com/repos/drbawb/rust-zmq/events","assignees_url":"https://api.github.com/repos/drbawb/rust-zmq/assignees{/user}","branches_url":"https://api.github.com/repos/drbawb/rust-zmq/branches{/branch}","tags_url":"https://api.github.com/repos/drbawb/rust-zmq/tags","blobs_url":"https://api.github.com/repos/drbawb/rust-zmq/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/drbawb/rust-zmq/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/drbawb/rust-zmq/git/refs{/sha}","trees_url":"https://api.github.com/repos/drbawb/rust-zmq/git/trees{/sha}","statuses_url":"https://api.github.com/repos/drbawb/rust-zmq/statuses/{sha}","languages_url":"https://api.github.com/repos/drbawb/rust-zmq/languages","stargazers_url":"https://api.github.com/repos/drbawb/rust-zmq/stargazers","contributors_url":"https://api.github.com/repos/drbawb/rust-zmq/contributors","subscribers_url":"https://api.github.com/repos/drbawb/rust-zmq/subscribers","subscription_url":"https://api.github.com/repos/drbawb/rust-zmq/subscription","commits_url":"https://api.github.com/repos/drbawb/rust-zmq/commits{/sha}","git_commits_url":"https://api.github.com/repos/drbawb/rust-zmq/git/commits{/sha}","comments_url":"https://api.github.com/repos/drbawb/rust-zmq/comments{/number}","issue_comment_url":"https://api.github.com/repos/drbawb/rust-zmq/issues/comments/{number}","contents_url":"https://api.github.com/repos/drbawb/rust-zmq/contents/{+path}","compare_url":"https://api.github.com/repos/drbawb/rust-zmq/compare/{base}...{head}","merges_url":"https://api.github.com/repos/drbawb/rust-zmq/merges","archive_url":"https://api.github.com/repos/drbawb/rust-zmq/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/drbawb/rust-zmq/downloads","issues_url":"https://api.github.com/repos/drbawb/rust-zmq/issues{/number}","pulls_url":"https://api.github.com/repos/drbawb/rust-zmq/pulls{/number}","milestones_url":"https://api.github.com/repos/drbawb/rust-zmq/milestones{/number}","notifications_url":"https://api.github.com/repos/drbawb/rust-zmq/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/drbawb/rust-zmq/labels{/name}","releases_url":"https://api.github.com/repos/drbawb/rust-zmq/releases{/id}","created_at":"2014-06-30T14:08:54Z","updated_at":"2014-06-27T14:49:13Z","pushed_at":"2015-01-13T22:05:33Z","git_url":"git://github.com/drbawb/rust-zmq.git","ssh_url":"git@github.com:drbawb/rust-zmq.git","clone_url":"https://github.com/drbawb/rust-zmq.git","svn_url":"https://github.com/drbawb/rust-zmq","homepage":"","size":397,"stargazers_count":0,"watchers_count":0,"language":"Rust","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":"jedisct1:master","ref":"master","sha":"db5f85cba4a0a2ae9555c0e10236e53bc82928cc","user":{"login":"jedisct1","id":124872,"avatar_url":"https://avatars.githubusercontent.com/u/124872?v=3","gravatar_id":"","url":"https://api.github.com/users/jedisct1","html_url":"https://github.com/jedisct1","followers_url":"https://api.github.com/users/jedisct1/followers","following_url":"https://api.github.com/users/jedisct1/following{/other_user}","gists_url":"https://api.github.com/users/jedisct1/gists{/gist_id}","starred_url":"https://api.github.com/users/jedisct1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jedisct1/subscriptions","organizations_url":"https://api.github.com/users/jedisct1/orgs","repos_url":"https://api.github.com/users/jedisct1/repos","events_url":"https://api.github.com/users/jedisct1/events{/privacy}","received_events_url":"https://api.github.com/users/jedisct1/received_events","type":"User","site_admin":false},"repo":{"id":12839861,"name":"rust-zmq","full_name":"jedisct1/rust-zmq","owner":{"login":"jedisct1","id":124872,"avatar_url":"https://avatars.githubusercontent.com/u/124872?v=3","gravatar_id":"","url":"https://api.github.com/users/jedisct1","html_url":"https://github.com/jedisct1","followers_url":"https://api.github.com/users/jedisct1/followers","following_url":"https://api.github.com/users/jedisct1/following{/other_user}","gists_url":"https://api.github.com/users/jedisct1/gists{/gist_id}","starred_url":"https://api.github.com/users/jedisct1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jedisct1/subscriptions","organizations_url":"https://api.github.com/users/jedisct1/orgs","repos_url":"https://api.github.com/users/jedisct1/repos","events_url":"https://api.github.com/users/jedisct1/events{/privacy}","received_events_url":"https://api.github.com/users/jedisct1/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jedisct1/rust-zmq","description":"Rust zeromq bindings.","fork":true,"url":"https://api.github.com/repos/jedisct1/rust-zmq","forks_url":"https://api.github.com/repos/jedisct1/rust-zmq/forks","keys_url":"https://api.github.com/repos/jedisct1/rust-zmq/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jedisct1/rust-zmq/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jedisct1/rust-zmq/teams","hooks_url":"https://api.github.com/repos/jedisct1/rust-zmq/hooks","issue_events_url":"https://api.github.com/repos/jedisct1/rust-zmq/issues/events{/number}","events_url":"https://api.github.com/repos/jedisct1/rust-zmq/events","assignees_url":"https://api.github.com/repos/jedisct1/rust-zmq/assignees{/user}","branches_url":"https://api.github.com/repos/jedisct1/rust-zmq/branches{/branch}","tags_url":"https://api.github.com/repos/jedisct1/rust-zmq/tags","blobs_url":"https://api.github.com/repos/jedisct1/rust-zmq/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jedisct1/rust-zmq/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jedisct1/rust-zmq/git/refs{/sha}","trees_url":"https://api.github.com/repos/jedisct1/rust-zmq/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jedisct1/rust-zmq/statuses/{sha}","languages_url":"https://api.github.com/repos/jedisct1/rust-zmq/languages","stargazers_url":"https://api.github.com/repos/jedisct1/rust-zmq/stargazers","contributors_url":"https://api.github.com/repos/jedisct1/rust-zmq/contributors","subscribers_url":"https://api.github.com/repos/jedisct1/rust-zmq/subscribers","subscription_url":"https://api.github.com/repos/jedisct1/rust-zmq/subscription","commits_url":"https://api.github.com/repos/jedisct1/rust-zmq/commits{/sha}","git_commits_url":"https://api.github.com/repos/jedisct1/rust-zmq/git/commits{/sha}","comments_url":"https://api.github.com/repos/jedisct1/rust-zmq/comments{/number}","issue_comment_url":"https://api.github.com/repos/jedisct1/rust-zmq/issues/comments/{number}","contents_url":"https://api.github.com/repos/jedisct1/rust-zmq/contents/{+path}","compare_url":"https://api.github.com/repos/jedisct1/rust-zmq/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jedisct1/rust-zmq/merges","archive_url":"https://api.github.com/repos/jedisct1/rust-zmq/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jedisct1/rust-zmq/downloads","issues_url":"https://api.github.com/repos/jedisct1/rust-zmq/issues{/number}","pulls_url":"https://api.github.com/repos/jedisct1/rust-zmq/pulls{/number}","milestones_url":"https://api.github.com/repos/jedisct1/rust-zmq/milestones{/number}","notifications_url":"https://api.github.com/repos/jedisct1/rust-zmq/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jedisct1/rust-zmq/labels{/name}","releases_url":"https://api.github.com/repos/jedisct1/rust-zmq/releases{/id}","created_at":"2013-09-15T03:18:55Z","updated_at":"2015-01-11T11:49:17Z","pushed_at":"2015-01-11T11:49:16Z","git_url":"git://github.com/jedisct1/rust-zmq.git","ssh_url":"git@github.com:jedisct1/rust-zmq.git","clone_url":"https://github.com/jedisct1/rust-zmq.git","svn_url":"https://github.com/jedisct1/rust-zmq","homepage":"","size":663,"stargazers_count":0,"watchers_count":0,"language":"Rust","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jedisct1/rust-zmq/pulls/1"},"html":{"href":"https://github.com/jedisct1/rust-zmq/pull/1"},"issue":{"href":"https://api.github.com/repos/jedisct1/rust-zmq/issues/1"},"comments":{"href":"https://api.github.com/repos/jedisct1/rust-zmq/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/jedisct1/rust-zmq/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/jedisct1/rust-zmq/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/jedisct1/rust-zmq/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/jedisct1/rust-zmq/statuses/8c9484aba01bc131d3b00e90ea0ab3dddbd976f8"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":6,"additions":50,"deletions":39,"changed_files":7}}