{"action":"created","comment":{"url":"https://api.github.com/repos/tower-rs/tower/pulls/comments/215737460","pull_request_review_id":153070972,"id":215737460,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxNTczNzQ2MA==","diff_hunk":"@@ -0,0 +1,98 @@\n+//! Combinators for working with `Service`s\n+\n+use futures::{Future, IntoFuture};\n+use tower_service::Service;\n+\n+mod and_then;\n+mod apply;\n+mod map;\n+mod map_err;\n+mod then;\n+\n+pub use self::and_then::AndThen;\n+pub use self::apply::Apply;\n+pub use self::map::Map;\n+pub use self::map_err::MapErr;\n+pub use self::then::Then;\n+\n+impl<T: ?Sized> ServiceExt for T where T: Service {}\n+\n+/// An extension trait for `Service`s that provides a variety of convenient\n+/// adapters\n+pub trait ServiceExt: Service {\n+    fn apply<F, R, Req>(self, f: F) -> Apply<Self, F, R, Req>\n+    where\n+        Self: Clone + Sized,\n+        Self::Error: Into<<R::Future as Future>::Error>,\n+        F: Fn(Req, Self) -> R,\n+        R: IntoFuture,\n+    {\n+        Apply::new(f, self)\n+    }\n+\n+    /// Call another service after call to this one has resolved successfully.\n+    ///\n+    /// This function can be used to chain two services together and ensure that\n+    /// the second service isn't called until call to the fist service have finished.\n+    /// Result of the call to the first service is used as an input parameter\n+    /// for the second service's call.\n+    ///\n+    /// Note that this function consumes the receiving service and returns a\n+    /// wrapped version of it.\n+    fn and_then<B, U>(self, service: U) -> AndThen<Self, B>\n+    where\n+        Self: Sized,\n+        U: Into<B>,","path":"tower-util/src/ext/mod.rs","position":46,"original_position":45,"commit_id":"fa3c0e79e985ab0b381ce47d7ce47a8318a986b8","original_commit_id":"1a4531df57f872b5721eeb771408aa99742416a7","user":{"login":"carllerche","id":6180,"node_id":"MDQ6VXNlcjYxODA=","avatar_url":"https://avatars3.githubusercontent.com/u/6180?v=4","gravatar_id":"","url":"https://api.github.com/users/carllerche","html_url":"https://github.com/carllerche","followers_url":"https://api.github.com/users/carllerche/followers","following_url":"https://api.github.com/users/carllerche/following{/other_user}","gists_url":"https://api.github.com/users/carllerche/gists{/gist_id}","starred_url":"https://api.github.com/users/carllerche/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carllerche/subscriptions","organizations_url":"https://api.github.com/users/carllerche/orgs","repos_url":"https://api.github.com/users/carllerche/repos","events_url":"https://api.github.com/users/carllerche/events{/privacy}","received_events_url":"https://api.github.com/users/carllerche/received_events","type":"User","site_admin":false},"body":"Yeah, I think we should limit `Into` / `From` bounds due to type inference issues.\r\n\r\nLet's remove the conversion for now.\r\n\r\nSeparately, I think `IntoService` will helpful at some point, but lets punt for this PR so that we can get it merged.","created_at":"2018-09-06T18:48:14Z","updated_at":"2018-09-06T18:48:14Z","html_url":"https://github.com/tower-rs/tower/pull/104#discussion_r215737460","pull_request_url":"https://api.github.com/repos/tower-rs/tower/pulls/104","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/tower-rs/tower/pulls/comments/215737460"},"html":{"href":"https://github.com/tower-rs/tower/pull/104#discussion_r215737460"},"pull_request":{"href":"https://api.github.com/repos/tower-rs/tower/pulls/104"}},"in_reply_to_id":215010968},"pull_request":{"url":"https://api.github.com/repos/tower-rs/tower/pulls/104","id":212563722,"node_id":"MDExOlB1bGxSZXF1ZXN0MjEyNTYzNzIy","html_url":"https://github.com/tower-rs/tower/pull/104","diff_url":"https://github.com/tower-rs/tower/pull/104.diff","patch_url":"https://github.com/tower-rs/tower/pull/104.patch","issue_url":"https://api.github.com/repos/tower-rs/tower/issues/104","number":104,"state":"open","locked":false,"title":"[WIP] add combinators for working with Service's","user":{"login":"fafhrd91","id":598990,"node_id":"MDQ6VXNlcjU5ODk5MA==","avatar_url":"https://avatars2.githubusercontent.com/u/598990?v=4","gravatar_id":"","url":"https://api.github.com/users/fafhrd91","html_url":"https://github.com/fafhrd91","followers_url":"https://api.github.com/users/fafhrd91/followers","following_url":"https://api.github.com/users/fafhrd91/following{/other_user}","gists_url":"https://api.github.com/users/fafhrd91/gists{/gist_id}","starred_url":"https://api.github.com/users/fafhrd91/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fafhrd91/subscriptions","organizations_url":"https://api.github.com/users/fafhrd91/orgs","repos_url":"https://api.github.com/users/fafhrd91/repos","events_url":"https://api.github.com/users/fafhrd91/events{/privacy}","received_events_url":"https://api.github.com/users/fafhrd91/received_events","type":"User","site_admin":false},"body":"* ServiceExt trait\r\n* and_then, then, map, map_err, from_err, apply combinators\r\n\r\n### todo\r\n* examples\r\n* tests\r\n","created_at":"2018-09-01T20:50:14Z","updated_at":"2018-09-06T18:48:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1f92487a5837daedd3f8911559f9c43cbdddb5a3","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/tower-rs/tower/pulls/104/commits","review_comments_url":"https://api.github.com/repos/tower-rs/tower/pulls/104/comments","review_comment_url":"https://api.github.com/repos/tower-rs/tower/pulls/comments{/number}","comments_url":"https://api.github.com/repos/tower-rs/tower/issues/104/comments","statuses_url":"https://api.github.com/repos/tower-rs/tower/statuses/fa3c0e79e985ab0b381ce47d7ce47a8318a986b8","head":{"label":"fafhrd91:service-ext","ref":"service-ext","sha":"fa3c0e79e985ab0b381ce47d7ce47a8318a986b8","user":{"login":"fafhrd91","id":598990,"node_id":"MDQ6VXNlcjU5ODk5MA==","avatar_url":"https://avatars2.githubusercontent.com/u/598990?v=4","gravatar_id":"","url":"https://api.github.com/users/fafhrd91","html_url":"https://github.com/fafhrd91","followers_url":"https://api.github.com/users/fafhrd91/followers","following_url":"https://api.github.com/users/fafhrd91/following{/other_user}","gists_url":"https://api.github.com/users/fafhrd91/gists{/gist_id}","starred_url":"https://api.github.com/users/fafhrd91/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fafhrd91/subscriptions","organizations_url":"https://api.github.com/users/fafhrd91/orgs","repos_url":"https://api.github.com/users/fafhrd91/repos","events_url":"https://api.github.com/users/fafhrd91/events{/privacy}","received_events_url":"https://api.github.com/users/fafhrd91/received_events","type":"User","site_admin":false},"repo":{"id":146922117,"node_id":"MDEwOlJlcG9zaXRvcnkxNDY5MjIxMTc=","name":"tower","full_name":"fafhrd91/tower","owner":{"login":"fafhrd91","id":598990,"node_id":"MDQ6VXNlcjU5ODk5MA==","avatar_url":"https://avatars2.githubusercontent.com/u/598990?v=4","gravatar_id":"","url":"https://api.github.com/users/fafhrd91","html_url":"https://github.com/fafhrd91","followers_url":"https://api.github.com/users/fafhrd91/followers","following_url":"https://api.github.com/users/fafhrd91/following{/other_user}","gists_url":"https://api.github.com/users/fafhrd91/gists{/gist_id}","starred_url":"https://api.github.com/users/fafhrd91/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fafhrd91/subscriptions","organizations_url":"https://api.github.com/users/fafhrd91/orgs","repos_url":"https://api.github.com/users/fafhrd91/repos","events_url":"https://api.github.com/users/fafhrd91/events{/privacy}","received_events_url":"https://api.github.com/users/fafhrd91/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/fafhrd91/tower","description":"fn(Request) -> Future<Response>","fork":true,"url":"https://api.github.com/repos/fafhrd91/tower","forks_url":"https://api.github.com/repos/fafhrd91/tower/forks","keys_url":"https://api.github.com/repos/fafhrd91/tower/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fafhrd91/tower/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fafhrd91/tower/teams","hooks_url":"https://api.github.com/repos/fafhrd91/tower/hooks","issue_events_url":"https://api.github.com/repos/fafhrd91/tower/issues/events{/number}","events_url":"https://api.github.com/repos/fafhrd91/tower/events","assignees_url":"https://api.github.com/repos/fafhrd91/tower/assignees{/user}","branches_url":"https://api.github.com/repos/fafhrd91/tower/branches{/branch}","tags_url":"https://api.github.com/repos/fafhrd91/tower/tags","blobs_url":"https://api.github.com/repos/fafhrd91/tower/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fafhrd91/tower/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fafhrd91/tower/git/refs{/sha}","trees_url":"https://api.github.com/repos/fafhrd91/tower/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fafhrd91/tower/statuses/{sha}","languages_url":"https://api.github.com/repos/fafhrd91/tower/languages","stargazers_url":"https://api.github.com/repos/fafhrd91/tower/stargazers","contributors_url":"https://api.github.com/repos/fafhrd91/tower/contributors","subscribers_url":"https://api.github.com/repos/fafhrd91/tower/subscribers","subscription_url":"https://api.github.com/repos/fafhrd91/tower/subscription","commits_url":"https://api.github.com/repos/fafhrd91/tower/commits{/sha}","git_commits_url":"https://api.github.com/repos/fafhrd91/tower/git/commits{/sha}","comments_url":"https://api.github.com/repos/fafhrd91/tower/comments{/number}","issue_comment_url":"https://api.github.com/repos/fafhrd91/tower/issues/comments{/number}","contents_url":"https://api.github.com/repos/fafhrd91/tower/contents/{+path}","compare_url":"https://api.github.com/repos/fafhrd91/tower/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fafhrd91/tower/merges","archive_url":"https://api.github.com/repos/fafhrd91/tower/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fafhrd91/tower/downloads","issues_url":"https://api.github.com/repos/fafhrd91/tower/issues{/number}","pulls_url":"https://api.github.com/repos/fafhrd91/tower/pulls{/number}","milestones_url":"https://api.github.com/repos/fafhrd91/tower/milestones{/number}","notifications_url":"https://api.github.com/repos/fafhrd91/tower/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fafhrd91/tower/labels{/name}","releases_url":"https://api.github.com/repos/fafhrd91/tower/releases{/id}","deployments_url":"https://api.github.com/repos/fafhrd91/tower/deployments","created_at":"2018-08-31T17:19:39Z","updated_at":"2018-08-31T17:19:41Z","pushed_at":"2018-09-04T20:45:53Z","git_url":"git://github.com/fafhrd91/tower.git","ssh_url":"git@github.com:fafhrd91/tower.git","clone_url":"https://github.com/fafhrd91/tower.git","svn_url":"https://github.com/fafhrd91/tower","homepage":null,"size":1040,"stargazers_count":0,"watchers_count":0,"language":"Rust","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"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":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"tower-rs:master","ref":"master","sha":"7dabd34d241492259a6244cfb11f578f841a380f","user":{"login":"tower-rs","id":26263939,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI2MjYzOTM5","avatar_url":"https://avatars0.githubusercontent.com/u/26263939?v=4","gravatar_id":"","url":"https://api.github.com/users/tower-rs","html_url":"https://github.com/tower-rs","followers_url":"https://api.github.com/users/tower-rs/followers","following_url":"https://api.github.com/users/tower-rs/following{/other_user}","gists_url":"https://api.github.com/users/tower-rs/gists{/gist_id}","starred_url":"https://api.github.com/users/tower-rs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tower-rs/subscriptions","organizations_url":"https://api.github.com/users/tower-rs/orgs","repos_url":"https://api.github.com/users/tower-rs/repos","events_url":"https://api.github.com/users/tower-rs/events{/privacy}","received_events_url":"https://api.github.com/users/tower-rs/received_events","type":"Organization","site_admin":false},"repo":{"id":98244646,"node_id":"MDEwOlJlcG9zaXRvcnk5ODI0NDY0Ng==","name":"tower","full_name":"tower-rs/tower","owner":{"login":"tower-rs","id":26263939,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI2MjYzOTM5","avatar_url":"https://avatars0.githubusercontent.com/u/26263939?v=4","gravatar_id":"","url":"https://api.github.com/users/tower-rs","html_url":"https://github.com/tower-rs","followers_url":"https://api.github.com/users/tower-rs/followers","following_url":"https://api.github.com/users/tower-rs/following{/other_user}","gists_url":"https://api.github.com/users/tower-rs/gists{/gist_id}","starred_url":"https://api.github.com/users/tower-rs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tower-rs/subscriptions","organizations_url":"https://api.github.com/users/tower-rs/orgs","repos_url":"https://api.github.com/users/tower-rs/repos","events_url":"https://api.github.com/users/tower-rs/events{/privacy}","received_events_url":"https://api.github.com/users/tower-rs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/tower-rs/tower","description":"fn(Request) -> Future<Response>","fork":false,"url":"https://api.github.com/repos/tower-rs/tower","forks_url":"https://api.github.com/repos/tower-rs/tower/forks","keys_url":"https://api.github.com/repos/tower-rs/tower/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tower-rs/tower/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tower-rs/tower/teams","hooks_url":"https://api.github.com/repos/tower-rs/tower/hooks","issue_events_url":"https://api.github.com/repos/tower-rs/tower/issues/events{/number}","events_url":"https://api.github.com/repos/tower-rs/tower/events","assignees_url":"https://api.github.com/repos/tower-rs/tower/assignees{/user}","branches_url":"https://api.github.com/repos/tower-rs/tower/branches{/branch}","tags_url":"https://api.github.com/repos/tower-rs/tower/tags","blobs_url":"https://api.github.com/repos/tower-rs/tower/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tower-rs/tower/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tower-rs/tower/git/refs{/sha}","trees_url":"https://api.github.com/repos/tower-rs/tower/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tower-rs/tower/statuses/{sha}","languages_url":"https://api.github.com/repos/tower-rs/tower/languages","stargazers_url":"https://api.github.com/repos/tower-rs/tower/stargazers","contributors_url":"https://api.github.com/repos/tower-rs/tower/contributors","subscribers_url":"https://api.github.com/repos/tower-rs/tower/subscribers","subscription_url":"https://api.github.com/repos/tower-rs/tower/subscription","commits_url":"https://api.github.com/repos/tower-rs/tower/commits{/sha}","git_commits_url":"https://api.github.com/repos/tower-rs/tower/git/commits{/sha}","comments_url":"https://api.github.com/repos/tower-rs/tower/comments{/number}","issue_comment_url":"https://api.github.com/repos/tower-rs/tower/issues/comments{/number}","contents_url":"https://api.github.com/repos/tower-rs/tower/contents/{+path}","compare_url":"https://api.github.com/repos/tower-rs/tower/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tower-rs/tower/merges","archive_url":"https://api.github.com/repos/tower-rs/tower/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tower-rs/tower/downloads","issues_url":"https://api.github.com/repos/tower-rs/tower/issues{/number}","pulls_url":"https://api.github.com/repos/tower-rs/tower/pulls{/number}","milestones_url":"https://api.github.com/repos/tower-rs/tower/milestones{/number}","notifications_url":"https://api.github.com/repos/tower-rs/tower/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tower-rs/tower/labels{/name}","releases_url":"https://api.github.com/repos/tower-rs/tower/releases{/id}","deployments_url":"https://api.github.com/repos/tower-rs/tower/deployments","created_at":"2017-07-24T23:53:00Z","updated_at":"2018-09-06T10:26:58Z","pushed_at":"2018-09-04T20:45:54Z","git_url":"git://github.com/tower-rs/tower.git","ssh_url":"git@github.com:tower-rs/tower.git","clone_url":"https://github.com/tower-rs/tower.git","svn_url":"https://github.com/tower-rs/tower","homepage":null,"size":1045,"stargazers_count":390,"watchers_count":390,"language":"Rust","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":17,"mirror_url":null,"archived":false,"open_issues_count":35,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":17,"open_issues":35,"watchers":390,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/tower-rs/tower/pulls/104"},"html":{"href":"https://github.com/tower-rs/tower/pull/104"},"issue":{"href":"https://api.github.com/repos/tower-rs/tower/issues/104"},"comments":{"href":"https://api.github.com/repos/tower-rs/tower/issues/104/comments"},"review_comments":{"href":"https://api.github.com/repos/tower-rs/tower/pulls/104/comments"},"review_comment":{"href":"https://api.github.com/repos/tower-rs/tower/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/tower-rs/tower/pulls/104/commits"},"statuses":{"href":"https://api.github.com/repos/tower-rs/tower/statuses/fa3c0e79e985ab0b381ce47d7ce47a8318a986b8"}},"author_association":"NONE"}}
{"actor":{"display_login":"carllerche"}}