{"action":"created","comment":{"url":"https://api.github.com/repos/libp2p/rust-libp2p/pulls/comments/206151401","pull_request_review_id":141555098,"id":206151401,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwNjE1MTQwMQ==","diff_hunk":"@@ -116,33 +113,63 @@ where\n     /// Returns a future that is signalled once the closure in the `swarm` has returned its future.\n     /// Therefore if the closure in the swarm has some side effect (eg. write something in a\n     /// variable), this side effect will be observable when this future succeeds.\n+    #[inline]\n     pub fn dial<Du>(&self, multiaddr: Multiaddr, transport: Du)\n         -> Result<impl Future<Item = (), Error = IoError>, Multiaddr>\n     where\n         Du: Transport + 'static, // TODO: 'static :-/\n         Du::Output: Into<T::Output>,\n+    {\n+        self.dial_then(multiaddr, transport, |v| v)\n+    }\n+\n+    /// Internal version of `dial` that allows adding a closure that is called after either the\n+    /// dialing fails or the handler has been called with the resulting future.\n+    ///\n+    /// The returned future is filled with the output of `then`.\n+    pub(crate) fn dial_then<Du, F>(&self, multiaddr: Multiaddr, transport: Du, then: F)","path":"core/src/swarm.rs","position":113,"original_position":113,"commit_id":"66fbc0c68118dc52a1ada5964ff9a3153a0e0952","original_commit_id":"66fbc0c68118dc52a1ada5964ff9a3153a0e0952","user":{"login":"tomaka","id":1412254,"node_id":"MDQ6VXNlcjE0MTIyNTQ=","avatar_url":"https://avatars1.githubusercontent.com/u/1412254?v=4","gravatar_id":"","url":"https://api.github.com/users/tomaka","html_url":"https://github.com/tomaka","followers_url":"https://api.github.com/users/tomaka/followers","following_url":"https://api.github.com/users/tomaka/following{/other_user}","gists_url":"https://api.github.com/users/tomaka/gists{/gist_id}","starred_url":"https://api.github.com/users/tomaka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomaka/subscriptions","organizations_url":"https://api.github.com/users/tomaka/orgs","repos_url":"https://api.github.com/users/tomaka/repos","events_url":"https://api.github.com/users/tomaka/events{/privacy}","received_events_url":"https://api.github.com/users/tomaka/received_events","type":"User","site_admin":false},"body":"The future returned by `dial` and `dial_then` doesn't get automatically processed as part of the `swarm_future`.\r\n\r\nBefore this change, if you call `unique_connec.dial()` (or `get_or_dial()`) and drop the `Future` returned by `dial()`, then the `unique_connec` will not update its state. By putting this logic as part of the `swarm_future`, we know that it's going to be the case.\r\n","created_at":"2018-07-30T14:21:11Z","updated_at":"2018-07-30T14:21:12Z","html_url":"https://github.com/libp2p/rust-libp2p/pull/366#discussion_r206151401","pull_request_url":"https://api.github.com/repos/libp2p/rust-libp2p/pulls/366","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/libp2p/rust-libp2p/pulls/comments/206151401"},"html":{"href":"https://github.com/libp2p/rust-libp2p/pull/366#discussion_r206151401"},"pull_request":{"href":"https://api.github.com/repos/libp2p/rust-libp2p/pulls/366"}},"in_reply_to_id":206071092},"pull_request":{"url":"https://api.github.com/repos/libp2p/rust-libp2p/pulls/366","id":203547815,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAzNTQ3ODE1","html_url":"https://github.com/libp2p/rust-libp2p/pull/366","diff_url":"https://github.com/libp2p/rust-libp2p/pull/366.diff","patch_url":"https://github.com/libp2p/rust-libp2p/pull/366.patch","issue_url":"https://api.github.com/repos/libp2p/rust-libp2p/issues/366","number":366,"state":"open","locked":false,"title":"Rework swarm and allow interrupting a dial","user":{"login":"tomaka","id":1412254,"node_id":"MDQ6VXNlcjE0MTIyNTQ=","avatar_url":"https://avatars1.githubusercontent.com/u/1412254?v=4","gravatar_id":"","url":"https://api.github.com/users/tomaka","html_url":"https://github.com/tomaka","followers_url":"https://api.github.com/users/tomaka/followers","following_url":"https://api.github.com/users/tomaka/following{/other_user}","gists_url":"https://api.github.com/users/tomaka/gists{/gist_id}","starred_url":"https://api.github.com/users/tomaka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomaka/subscriptions","organizations_url":"https://api.github.com/users/tomaka/orgs","repos_url":"https://api.github.com/users/tomaka/repos","events_url":"https://api.github.com/users/tomaka/events{/privacy}","received_events_url":"https://api.github.com/users/tomaka/received_events","type":"User","site_admin":false},"body":"cc #344 \r\n\r\nRemoves several `Arcs`, but most notably allows interrupting current dialing attempts.\r\nThis change will also later allow more control, like removing listeners.","created_at":"2018-07-24T14:31:25Z","updated_at":"2018-07-30T14:21:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"82b28c41c9a5622d51be55ba5150b98377191afa","assignee":{"login":"tomaka","id":1412254,"node_id":"MDQ6VXNlcjE0MTIyNTQ=","avatar_url":"https://avatars1.githubusercontent.com/u/1412254?v=4","gravatar_id":"","url":"https://api.github.com/users/tomaka","html_url":"https://github.com/tomaka","followers_url":"https://api.github.com/users/tomaka/followers","following_url":"https://api.github.com/users/tomaka/following{/other_user}","gists_url":"https://api.github.com/users/tomaka/gists{/gist_id}","starred_url":"https://api.github.com/users/tomaka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomaka/subscriptions","organizations_url":"https://api.github.com/users/tomaka/orgs","repos_url":"https://api.github.com/users/tomaka/repos","events_url":"https://api.github.com/users/tomaka/events{/privacy}","received_events_url":"https://api.github.com/users/tomaka/received_events","type":"User","site_admin":false},"assignees":[{"login":"tomaka","id":1412254,"node_id":"MDQ6VXNlcjE0MTIyNTQ=","avatar_url":"https://avatars1.githubusercontent.com/u/1412254?v=4","gravatar_id":"","url":"https://api.github.com/users/tomaka","html_url":"https://github.com/tomaka","followers_url":"https://api.github.com/users/tomaka/followers","following_url":"https://api.github.com/users/tomaka/following{/other_user}","gists_url":"https://api.github.com/users/tomaka/gists{/gist_id}","starred_url":"https://api.github.com/users/tomaka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomaka/subscriptions","organizations_url":"https://api.github.com/users/tomaka/orgs","repos_url":"https://api.github.com/users/tomaka/repos","events_url":"https://api.github.com/users/tomaka/events{/privacy}","received_events_url":"https://api.github.com/users/tomaka/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":920184021,"node_id":"MDU6TGFiZWw5MjAxODQwMjE=","url":"https://api.github.com/repos/libp2p/rust-libp2p/labels/in%20progress","name":"in progress","color":"ededed","default":false},{"id":1003545996,"node_id":"MDU6TGFiZWwxMDAzNTQ1OTk2","url":"https://api.github.com/repos/libp2p/rust-libp2p/labels/pr-needs-work","name":"pr-needs-work","color":"5c4fcc","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/libp2p/rust-libp2p/pulls/366/commits","review_comments_url":"https://api.github.com/repos/libp2p/rust-libp2p/pulls/366/comments","review_comment_url":"https://api.github.com/repos/libp2p/rust-libp2p/pulls/comments{/number}","comments_url":"https://api.github.com/repos/libp2p/rust-libp2p/issues/366/comments","statuses_url":"https://api.github.com/repos/libp2p/rust-libp2p/statuses/66fbc0c68118dc52a1ada5964ff9a3153a0e0952","head":{"label":"tomaka:swarm-interrupt-dial","ref":"swarm-interrupt-dial","sha":"66fbc0c68118dc52a1ada5964ff9a3153a0e0952","user":{"login":"tomaka","id":1412254,"node_id":"MDQ6VXNlcjE0MTIyNTQ=","avatar_url":"https://avatars1.githubusercontent.com/u/1412254?v=4","gravatar_id":"","url":"https://api.github.com/users/tomaka","html_url":"https://github.com/tomaka","followers_url":"https://api.github.com/users/tomaka/followers","following_url":"https://api.github.com/users/tomaka/following{/other_user}","gists_url":"https://api.github.com/users/tomaka/gists{/gist_id}","starred_url":"https://api.github.com/users/tomaka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomaka/subscriptions","organizations_url":"https://api.github.com/users/tomaka/orgs","repos_url":"https://api.github.com/users/tomaka/repos","events_url":"https://api.github.com/users/tomaka/events{/privacy}","received_events_url":"https://api.github.com/users/tomaka/received_events","type":"User","site_admin":false},"repo":{"id":110135073,"node_id":"MDEwOlJlcG9zaXRvcnkxMTAxMzUwNzM=","name":"libp2p-rs","full_name":"tomaka/libp2p-rs","owner":{"login":"tomaka","id":1412254,"node_id":"MDQ6VXNlcjE0MTIyNTQ=","avatar_url":"https://avatars1.githubusercontent.com/u/1412254?v=4","gravatar_id":"","url":"https://api.github.com/users/tomaka","html_url":"https://github.com/tomaka","followers_url":"https://api.github.com/users/tomaka/followers","following_url":"https://api.github.com/users/tomaka/following{/other_user}","gists_url":"https://api.github.com/users/tomaka/gists{/gist_id}","starred_url":"https://api.github.com/users/tomaka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomaka/subscriptions","organizations_url":"https://api.github.com/users/tomaka/orgs","repos_url":"https://api.github.com/users/tomaka/repos","events_url":"https://api.github.com/users/tomaka/events{/privacy}","received_events_url":"https://api.github.com/users/tomaka/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tomaka/libp2p-rs","description":"LibP2P networking library written in Rust","fork":true,"url":"https://api.github.com/repos/tomaka/libp2p-rs","forks_url":"https://api.github.com/repos/tomaka/libp2p-rs/forks","keys_url":"https://api.github.com/repos/tomaka/libp2p-rs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tomaka/libp2p-rs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tomaka/libp2p-rs/teams","hooks_url":"https://api.github.com/repos/tomaka/libp2p-rs/hooks","issue_events_url":"https://api.github.com/repos/tomaka/libp2p-rs/issues/events{/number}","events_url":"https://api.github.com/repos/tomaka/libp2p-rs/events","assignees_url":"https://api.github.com/repos/tomaka/libp2p-rs/assignees{/user}","branches_url":"https://api.github.com/repos/tomaka/libp2p-rs/branches{/branch}","tags_url":"https://api.github.com/repos/tomaka/libp2p-rs/tags","blobs_url":"https://api.github.com/repos/tomaka/libp2p-rs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tomaka/libp2p-rs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tomaka/libp2p-rs/git/refs{/sha}","trees_url":"https://api.github.com/repos/tomaka/libp2p-rs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tomaka/libp2p-rs/statuses/{sha}","languages_url":"https://api.github.com/repos/tomaka/libp2p-rs/languages","stargazers_url":"https://api.github.com/repos/tomaka/libp2p-rs/stargazers","contributors_url":"https://api.github.com/repos/tomaka/libp2p-rs/contributors","subscribers_url":"https://api.github.com/repos/tomaka/libp2p-rs/subscribers","subscription_url":"https://api.github.com/repos/tomaka/libp2p-rs/subscription","commits_url":"https://api.github.com/repos/tomaka/libp2p-rs/commits{/sha}","git_commits_url":"https://api.github.com/repos/tomaka/libp2p-rs/git/commits{/sha}","comments_url":"https://api.github.com/repos/tomaka/libp2p-rs/comments{/number}","issue_comment_url":"https://api.github.com/repos/tomaka/libp2p-rs/issues/comments{/number}","contents_url":"https://api.github.com/repos/tomaka/libp2p-rs/contents/{+path}","compare_url":"https://api.github.com/repos/tomaka/libp2p-rs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tomaka/libp2p-rs/merges","archive_url":"https://api.github.com/repos/tomaka/libp2p-rs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tomaka/libp2p-rs/downloads","issues_url":"https://api.github.com/repos/tomaka/libp2p-rs/issues{/number}","pulls_url":"https://api.github.com/repos/tomaka/libp2p-rs/pulls{/number}","milestones_url":"https://api.github.com/repos/tomaka/libp2p-rs/milestones{/number}","notifications_url":"https://api.github.com/repos/tomaka/libp2p-rs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tomaka/libp2p-rs/labels{/name}","releases_url":"https://api.github.com/repos/tomaka/libp2p-rs/releases{/id}","deployments_url":"https://api.github.com/repos/tomaka/libp2p-rs/deployments","created_at":"2017-11-09T15:51:30Z","updated_at":"2018-07-27T09:29:59Z","pushed_at":"2018-07-30T14:17:18Z","git_url":"git://github.com/tomaka/libp2p-rs.git","ssh_url":"git@github.com:tomaka/libp2p-rs.git","clone_url":"https://github.com/tomaka/libp2p-rs.git","svn_url":"https://github.com/tomaka/libp2p-rs","homepage":"","size":1617,"stargazers_count":7,"watchers_count":7,"language":"Rust","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":1,"open_issues":0,"watchers":7,"default_branch":"master"}},"base":{"label":"libp2p:master","ref":"master","sha":"81e87359681f3f0db57583d4f8cdae3833dd74bd","user":{"login":"libp2p","id":14838238,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0ODM4MjM4","avatar_url":"https://avatars3.githubusercontent.com/u/14838238?v=4","gravatar_id":"","url":"https://api.github.com/users/libp2p","html_url":"https://github.com/libp2p","followers_url":"https://api.github.com/users/libp2p/followers","following_url":"https://api.github.com/users/libp2p/following{/other_user}","gists_url":"https://api.github.com/users/libp2p/gists{/gist_id}","starred_url":"https://api.github.com/users/libp2p/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/libp2p/subscriptions","organizations_url":"https://api.github.com/users/libp2p/orgs","repos_url":"https://api.github.com/users/libp2p/repos","events_url":"https://api.github.com/users/libp2p/events{/privacy}","received_events_url":"https://api.github.com/users/libp2p/received_events","type":"Organization","site_admin":false},"repo":{"id":86106381,"node_id":"MDEwOlJlcG9zaXRvcnk4NjEwNjM4MQ==","name":"rust-libp2p","full_name":"libp2p/rust-libp2p","owner":{"login":"libp2p","id":14838238,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0ODM4MjM4","avatar_url":"https://avatars3.githubusercontent.com/u/14838238?v=4","gravatar_id":"","url":"https://api.github.com/users/libp2p","html_url":"https://github.com/libp2p","followers_url":"https://api.github.com/users/libp2p/followers","following_url":"https://api.github.com/users/libp2p/following{/other_user}","gists_url":"https://api.github.com/users/libp2p/gists{/gist_id}","starred_url":"https://api.github.com/users/libp2p/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/libp2p/subscriptions","organizations_url":"https://api.github.com/users/libp2p/orgs","repos_url":"https://api.github.com/users/libp2p/repos","events_url":"https://api.github.com/users/libp2p/events{/privacy}","received_events_url":"https://api.github.com/users/libp2p/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/libp2p/rust-libp2p","description":"The Rust Implementation of libp2p networking stack. ","fork":false,"url":"https://api.github.com/repos/libp2p/rust-libp2p","forks_url":"https://api.github.com/repos/libp2p/rust-libp2p/forks","keys_url":"https://api.github.com/repos/libp2p/rust-libp2p/keys{/key_id}","collaborators_url":"https://api.github.com/repos/libp2p/rust-libp2p/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/libp2p/rust-libp2p/teams","hooks_url":"https://api.github.com/repos/libp2p/rust-libp2p/hooks","issue_events_url":"https://api.github.com/repos/libp2p/rust-libp2p/issues/events{/number}","events_url":"https://api.github.com/repos/libp2p/rust-libp2p/events","assignees_url":"https://api.github.com/repos/libp2p/rust-libp2p/assignees{/user}","branches_url":"https://api.github.com/repos/libp2p/rust-libp2p/branches{/branch}","tags_url":"https://api.github.com/repos/libp2p/rust-libp2p/tags","blobs_url":"https://api.github.com/repos/libp2p/rust-libp2p/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/libp2p/rust-libp2p/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/libp2p/rust-libp2p/git/refs{/sha}","trees_url":"https://api.github.com/repos/libp2p/rust-libp2p/git/trees{/sha}","statuses_url":"https://api.github.com/repos/libp2p/rust-libp2p/statuses/{sha}","languages_url":"https://api.github.com/repos/libp2p/rust-libp2p/languages","stargazers_url":"https://api.github.com/repos/libp2p/rust-libp2p/stargazers","contributors_url":"https://api.github.com/repos/libp2p/rust-libp2p/contributors","subscribers_url":"https://api.github.com/repos/libp2p/rust-libp2p/subscribers","subscription_url":"https://api.github.com/repos/libp2p/rust-libp2p/subscription","commits_url":"https://api.github.com/repos/libp2p/rust-libp2p/commits{/sha}","git_commits_url":"https://api.github.com/repos/libp2p/rust-libp2p/git/commits{/sha}","comments_url":"https://api.github.com/repos/libp2p/rust-libp2p/comments{/number}","issue_comment_url":"https://api.github.com/repos/libp2p/rust-libp2p/issues/comments{/number}","contents_url":"https://api.github.com/repos/libp2p/rust-libp2p/contents/{+path}","compare_url":"https://api.github.com/repos/libp2p/rust-libp2p/compare/{base}...{head}","merges_url":"https://api.github.com/repos/libp2p/rust-libp2p/merges","archive_url":"https://api.github.com/repos/libp2p/rust-libp2p/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/libp2p/rust-libp2p/downloads","issues_url":"https://api.github.com/repos/libp2p/rust-libp2p/issues{/number}","pulls_url":"https://api.github.com/repos/libp2p/rust-libp2p/pulls{/number}","milestones_url":"https://api.github.com/repos/libp2p/rust-libp2p/milestones{/number}","notifications_url":"https://api.github.com/repos/libp2p/rust-libp2p/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/libp2p/rust-libp2p/labels{/name}","releases_url":"https://api.github.com/repos/libp2p/rust-libp2p/releases{/id}","deployments_url":"https://api.github.com/repos/libp2p/rust-libp2p/deployments","created_at":"2017-03-24T20:05:11Z","updated_at":"2018-07-30T14:06:09Z","pushed_at":"2018-07-30T14:06:04Z","git_url":"git://github.com/libp2p/rust-libp2p.git","ssh_url":"git@github.com:libp2p/rust-libp2p.git","clone_url":"https://github.com/libp2p/rust-libp2p.git","svn_url":"https://github.com/libp2p/rust-libp2p","homepage":"https://libp2p.io","size":1335,"stargazers_count":348,"watchers_count":348,"language":"Rust","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":41,"mirror_url":null,"archived":false,"open_issues_count":91,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":41,"open_issues":91,"watchers":348,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/libp2p/rust-libp2p/pulls/366"},"html":{"href":"https://github.com/libp2p/rust-libp2p/pull/366"},"issue":{"href":"https://api.github.com/repos/libp2p/rust-libp2p/issues/366"},"comments":{"href":"https://api.github.com/repos/libp2p/rust-libp2p/issues/366/comments"},"review_comments":{"href":"https://api.github.com/repos/libp2p/rust-libp2p/pulls/366/comments"},"review_comment":{"href":"https://api.github.com/repos/libp2p/rust-libp2p/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/libp2p/rust-libp2p/pulls/366/commits"},"statuses":{"href":"https://api.github.com/repos/libp2p/rust-libp2p/statuses/66fbc0c68118dc52a1ada5964ff9a3153a0e0952"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"tomaka"}}