{"action":"created","comment":{"url":"https://api.github.com/repos/tox-rs/tox/pulls/comments/237172968","pull_request_review_id":179407145,"id":237172968,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzNzE3Mjk2OA==","diff_hunk":"@@ -60,7 +61,7 @@ impl Client {\n             ip_addr,\n             port,\n             tx,\n-            links: [None; 240],\n+            links: Mutex::new(Links::new()),","path":"src/toxcore/tcp/server/client.rs","position":31,"original_position":31,"commit_id":"4229a6ae9d3ad5548c1bf0f63c1eb4733a368bb6","original_commit_id":"4229a6ae9d3ad5548c1bf0f63c1eb4733a368bb6","user":{"login":"kpp","id":467709,"node_id":"MDQ6VXNlcjQ2NzcwOQ==","avatar_url":"https://avatars1.githubusercontent.com/u/467709?v=4","gravatar_id":"","url":"https://api.github.com/users/kpp","html_url":"https://github.com/kpp","followers_url":"https://api.github.com/users/kpp/followers","following_url":"https://api.github.com/users/kpp/following{/other_user}","gists_url":"https://api.github.com/users/kpp/gists{/gist_id}","starred_url":"https://api.github.com/users/kpp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kpp/subscriptions","organizations_url":"https://api.github.com/users/kpp/orgs","repos_url":"https://api.github.com/users/kpp/repos","events_url":"https://api.github.com/users/kpp/events{/privacy}","received_events_url":"https://api.github.com/users/kpp/received_events","type":"User","site_admin":false},"body":"No, because\r\n\r\n```\r\n    fn handle_route_request(&self, pk: &PublicKey, packet: &RouteRequest) -> IoFuture<()> {\r\n        let state = self.state.read();\r\n...\r\n        client_a.links().upgrade(b_id_in_client_a);\r\n        client_b.links().upgrade(a_id_in_client_b);\r\n```\r\n\r\nWe need interior mutability but on the other side https://doc.rust-lang.org/std/cell/struct.RefCell.html#method.borrow_mut  :\r\n\r\n> \r\n\r\nPanics if the value is currently borrowed\r\n\r\n","created_at":"2018-11-28T16:56:14Z","updated_at":"2018-11-28T16:56:14Z","html_url":"https://github.com/tox-rs/tox/pull/261#discussion_r237172968","pull_request_url":"https://api.github.com/repos/tox-rs/tox/pulls/261","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/tox-rs/tox/pulls/comments/237172968"},"html":{"href":"https://github.com/tox-rs/tox/pull/261#discussion_r237172968"},"pull_request":{"href":"https://api.github.com/repos/tox-rs/tox/pulls/261"}},"in_reply_to_id":237171489},"pull_request":{"url":"https://api.github.com/repos/tox-rs/tox/pulls/261","id":229732632,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI5NzMyNjMy","html_url":"https://github.com/tox-rs/tox/pull/261","diff_url":"https://github.com/tox-rs/tox/pull/261.diff","patch_url":"https://github.com/tox-rs/tox/pull/261.patch","issue_url":"https://api.github.com/repos/tox-rs/tox/issues/261","number":261,"state":"open","locked":false,"title":"WIP: Add Links to TcpServer for O(1) search","user":{"login":"kpp","id":467709,"node_id":"MDQ6VXNlcjQ2NzcwOQ==","avatar_url":"https://avatars1.githubusercontent.com/u/467709?v=4","gravatar_id":"","url":"https://api.github.com/users/kpp","html_url":"https://github.com/kpp","followers_url":"https://api.github.com/users/kpp/followers","following_url":"https://api.github.com/users/kpp/following{/other_user}","gists_url":"https://api.github.com/users/kpp/gists{/gist_id}","starred_url":"https://api.github.com/users/kpp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kpp/subscriptions","organizations_url":"https://api.github.com/users/kpp/orgs","repos_url":"https://api.github.com/users/kpp/repos","events_url":"https://api.github.com/users/kpp/events{/privacy}","received_events_url":"https://api.github.com/users/kpp/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-11-09T15:40:26Z","updated_at":"2018-11-28T16:56:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6f4d4fadaa0a74f62de0511fb916b169fb063475","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/tox-rs/tox/pulls/261/commits","review_comments_url":"https://api.github.com/repos/tox-rs/tox/pulls/261/comments","review_comment_url":"https://api.github.com/repos/tox-rs/tox/pulls/comments{/number}","comments_url":"https://api.github.com/repos/tox-rs/tox/issues/261/comments","statuses_url":"https://api.github.com/repos/tox-rs/tox/statuses/4229a6ae9d3ad5548c1bf0f63c1eb4733a368bb6","head":{"label":"tox-rs:tcp_server_links","ref":"tcp_server_links","sha":"4229a6ae9d3ad5548c1bf0f63c1eb4733a368bb6","user":{"login":"tox-rs","id":35774911,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM1Nzc0OTEx","avatar_url":"https://avatars2.githubusercontent.com/u/35774911?v=4","gravatar_id":"","url":"https://api.github.com/users/tox-rs","html_url":"https://github.com/tox-rs","followers_url":"https://api.github.com/users/tox-rs/followers","following_url":"https://api.github.com/users/tox-rs/following{/other_user}","gists_url":"https://api.github.com/users/tox-rs/gists{/gist_id}","starred_url":"https://api.github.com/users/tox-rs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tox-rs/subscriptions","organizations_url":"https://api.github.com/users/tox-rs/orgs","repos_url":"https://api.github.com/users/tox-rs/repos","events_url":"https://api.github.com/users/tox-rs/events{/privacy}","received_events_url":"https://api.github.com/users/tox-rs/received_events","type":"Organization","site_admin":false},"repo":{"id":118792123,"node_id":"MDEwOlJlcG9zaXRvcnkxMTg3OTIxMjM=","name":"tox","full_name":"tox-rs/tox","private":false,"owner":{"login":"tox-rs","id":35774911,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM1Nzc0OTEx","avatar_url":"https://avatars2.githubusercontent.com/u/35774911?v=4","gravatar_id":"","url":"https://api.github.com/users/tox-rs","html_url":"https://github.com/tox-rs","followers_url":"https://api.github.com/users/tox-rs/followers","following_url":"https://api.github.com/users/tox-rs/following{/other_user}","gists_url":"https://api.github.com/users/tox-rs/gists{/gist_id}","starred_url":"https://api.github.com/users/tox-rs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tox-rs/subscriptions","organizations_url":"https://api.github.com/users/tox-rs/orgs","repos_url":"https://api.github.com/users/tox-rs/repos","events_url":"https://api.github.com/users/tox-rs/events{/privacy}","received_events_url":"https://api.github.com/users/tox-rs/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/tox-rs/tox","description":"toxcore implementation in Rust","fork":false,"url":"https://api.github.com/repos/tox-rs/tox","forks_url":"https://api.github.com/repos/tox-rs/tox/forks","keys_url":"https://api.github.com/repos/tox-rs/tox/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tox-rs/tox/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tox-rs/tox/teams","hooks_url":"https://api.github.com/repos/tox-rs/tox/hooks","issue_events_url":"https://api.github.com/repos/tox-rs/tox/issues/events{/number}","events_url":"https://api.github.com/repos/tox-rs/tox/events","assignees_url":"https://api.github.com/repos/tox-rs/tox/assignees{/user}","branches_url":"https://api.github.com/repos/tox-rs/tox/branches{/branch}","tags_url":"https://api.github.com/repos/tox-rs/tox/tags","blobs_url":"https://api.github.com/repos/tox-rs/tox/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tox-rs/tox/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tox-rs/tox/git/refs{/sha}","trees_url":"https://api.github.com/repos/tox-rs/tox/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tox-rs/tox/statuses/{sha}","languages_url":"https://api.github.com/repos/tox-rs/tox/languages","stargazers_url":"https://api.github.com/repos/tox-rs/tox/stargazers","contributors_url":"https://api.github.com/repos/tox-rs/tox/contributors","subscribers_url":"https://api.github.com/repos/tox-rs/tox/subscribers","subscription_url":"https://api.github.com/repos/tox-rs/tox/subscription","commits_url":"https://api.github.com/repos/tox-rs/tox/commits{/sha}","git_commits_url":"https://api.github.com/repos/tox-rs/tox/git/commits{/sha}","comments_url":"https://api.github.com/repos/tox-rs/tox/comments{/number}","issue_comment_url":"https://api.github.com/repos/tox-rs/tox/issues/comments{/number}","contents_url":"https://api.github.com/repos/tox-rs/tox/contents/{+path}","compare_url":"https://api.github.com/repos/tox-rs/tox/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tox-rs/tox/merges","archive_url":"https://api.github.com/repos/tox-rs/tox/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tox-rs/tox/downloads","issues_url":"https://api.github.com/repos/tox-rs/tox/issues{/number}","pulls_url":"https://api.github.com/repos/tox-rs/tox/pulls{/number}","milestones_url":"https://api.github.com/repos/tox-rs/tox/milestones{/number}","notifications_url":"https://api.github.com/repos/tox-rs/tox/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tox-rs/tox/labels{/name}","releases_url":"https://api.github.com/repos/tox-rs/tox/releases{/id}","deployments_url":"https://api.github.com/repos/tox-rs/tox/deployments","created_at":"2018-01-24T16:35:53Z","updated_at":"2018-11-28T15:52:07Z","pushed_at":"2018-11-28T15:52:06Z","git_url":"git://github.com/tox-rs/tox.git","ssh_url":"git@github.com:tox-rs/tox.git","clone_url":"https://github.com/tox-rs/tox.git","svn_url":"https://github.com/tox-rs/tox","homepage":"","size":2630,"stargazers_count":133,"watchers_count":133,"language":"Rust","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"archived":false,"open_issues_count":18,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":5,"open_issues":18,"watchers":133,"default_branch":"master"}},"base":{"label":"tox-rs:master","ref":"master","sha":"41880d1bf59913ba0cc92112d8b1fb1d4dc43b5b","user":{"login":"tox-rs","id":35774911,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM1Nzc0OTEx","avatar_url":"https://avatars2.githubusercontent.com/u/35774911?v=4","gravatar_id":"","url":"https://api.github.com/users/tox-rs","html_url":"https://github.com/tox-rs","followers_url":"https://api.github.com/users/tox-rs/followers","following_url":"https://api.github.com/users/tox-rs/following{/other_user}","gists_url":"https://api.github.com/users/tox-rs/gists{/gist_id}","starred_url":"https://api.github.com/users/tox-rs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tox-rs/subscriptions","organizations_url":"https://api.github.com/users/tox-rs/orgs","repos_url":"https://api.github.com/users/tox-rs/repos","events_url":"https://api.github.com/users/tox-rs/events{/privacy}","received_events_url":"https://api.github.com/users/tox-rs/received_events","type":"Organization","site_admin":false},"repo":{"id":118792123,"node_id":"MDEwOlJlcG9zaXRvcnkxMTg3OTIxMjM=","name":"tox","full_name":"tox-rs/tox","private":false,"owner":{"login":"tox-rs","id":35774911,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM1Nzc0OTEx","avatar_url":"https://avatars2.githubusercontent.com/u/35774911?v=4","gravatar_id":"","url":"https://api.github.com/users/tox-rs","html_url":"https://github.com/tox-rs","followers_url":"https://api.github.com/users/tox-rs/followers","following_url":"https://api.github.com/users/tox-rs/following{/other_user}","gists_url":"https://api.github.com/users/tox-rs/gists{/gist_id}","starred_url":"https://api.github.com/users/tox-rs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tox-rs/subscriptions","organizations_url":"https://api.github.com/users/tox-rs/orgs","repos_url":"https://api.github.com/users/tox-rs/repos","events_url":"https://api.github.com/users/tox-rs/events{/privacy}","received_events_url":"https://api.github.com/users/tox-rs/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/tox-rs/tox","description":"toxcore implementation in Rust","fork":false,"url":"https://api.github.com/repos/tox-rs/tox","forks_url":"https://api.github.com/repos/tox-rs/tox/forks","keys_url":"https://api.github.com/repos/tox-rs/tox/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tox-rs/tox/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tox-rs/tox/teams","hooks_url":"https://api.github.com/repos/tox-rs/tox/hooks","issue_events_url":"https://api.github.com/repos/tox-rs/tox/issues/events{/number}","events_url":"https://api.github.com/repos/tox-rs/tox/events","assignees_url":"https://api.github.com/repos/tox-rs/tox/assignees{/user}","branches_url":"https://api.github.com/repos/tox-rs/tox/branches{/branch}","tags_url":"https://api.github.com/repos/tox-rs/tox/tags","blobs_url":"https://api.github.com/repos/tox-rs/tox/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tox-rs/tox/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tox-rs/tox/git/refs{/sha}","trees_url":"https://api.github.com/repos/tox-rs/tox/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tox-rs/tox/statuses/{sha}","languages_url":"https://api.github.com/repos/tox-rs/tox/languages","stargazers_url":"https://api.github.com/repos/tox-rs/tox/stargazers","contributors_url":"https://api.github.com/repos/tox-rs/tox/contributors","subscribers_url":"https://api.github.com/repos/tox-rs/tox/subscribers","subscription_url":"https://api.github.com/repos/tox-rs/tox/subscription","commits_url":"https://api.github.com/repos/tox-rs/tox/commits{/sha}","git_commits_url":"https://api.github.com/repos/tox-rs/tox/git/commits{/sha}","comments_url":"https://api.github.com/repos/tox-rs/tox/comments{/number}","issue_comment_url":"https://api.github.com/repos/tox-rs/tox/issues/comments{/number}","contents_url":"https://api.github.com/repos/tox-rs/tox/contents/{+path}","compare_url":"https://api.github.com/repos/tox-rs/tox/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tox-rs/tox/merges","archive_url":"https://api.github.com/repos/tox-rs/tox/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tox-rs/tox/downloads","issues_url":"https://api.github.com/repos/tox-rs/tox/issues{/number}","pulls_url":"https://api.github.com/repos/tox-rs/tox/pulls{/number}","milestones_url":"https://api.github.com/repos/tox-rs/tox/milestones{/number}","notifications_url":"https://api.github.com/repos/tox-rs/tox/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tox-rs/tox/labels{/name}","releases_url":"https://api.github.com/repos/tox-rs/tox/releases{/id}","deployments_url":"https://api.github.com/repos/tox-rs/tox/deployments","created_at":"2018-01-24T16:35:53Z","updated_at":"2018-11-28T15:52:07Z","pushed_at":"2018-11-28T15:52:06Z","git_url":"git://github.com/tox-rs/tox.git","ssh_url":"git@github.com:tox-rs/tox.git","clone_url":"https://github.com/tox-rs/tox.git","svn_url":"https://github.com/tox-rs/tox","homepage":"","size":2630,"stargazers_count":133,"watchers_count":133,"language":"Rust","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"archived":false,"open_issues_count":18,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":5,"open_issues":18,"watchers":133,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/tox-rs/tox/pulls/261"},"html":{"href":"https://github.com/tox-rs/tox/pull/261"},"issue":{"href":"https://api.github.com/repos/tox-rs/tox/issues/261"},"comments":{"href":"https://api.github.com/repos/tox-rs/tox/issues/261/comments"},"review_comments":{"href":"https://api.github.com/repos/tox-rs/tox/pulls/261/comments"},"review_comment":{"href":"https://api.github.com/repos/tox-rs/tox/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/tox-rs/tox/pulls/261/commits"},"statuses":{"href":"https://api.github.com/repos/tox-rs/tox/statuses/4229a6ae9d3ad5548c1bf0f63c1eb4733a368bb6"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"kpp"}}