{"action":"closed","issue":{"url":"https://api.github.com/repos/tower-rs/tower-h2/issues/43","repository_url":"https://api.github.com/repos/tower-rs/tower-h2","labels_url":"https://api.github.com/repos/tower-rs/tower-h2/issues/43/labels{/name}","comments_url":"https://api.github.com/repos/tower-rs/tower-h2/issues/43/comments","events_url":"https://api.github.com/repos/tower-rs/tower-h2/issues/43/events","html_url":"https://github.com/tower-rs/tower-h2/issues/43","id":383973894,"node_id":"MDU6SXNzdWUzODM5NzM4OTQ=","number":43,"title":"Server::new does not impose bounds on Executor","user":{"login":"mzabaluev","id":1198919,"node_id":"MDQ6VXNlcjExOTg5MTk=","avatar_url":"https://avatars0.githubusercontent.com/u/1198919?v=4","gravatar_id":"","url":"https://api.github.com/users/mzabaluev","html_url":"https://github.com/mzabaluev","followers_url":"https://api.github.com/users/mzabaluev/followers","following_url":"https://api.github.com/users/mzabaluev/following{/other_user}","gists_url":"https://api.github.com/users/mzabaluev/gists{/gist_id}","starred_url":"https://api.github.com/users/mzabaluev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mzabaluev/subscriptions","organizations_url":"https://api.github.com/users/mzabaluev/orgs","repos_url":"https://api.github.com/users/mzabaluev/repos","events_url":"https://api.github.com/users/mzabaluev/events{/privacy}","received_events_url":"https://api.github.com/users/mzabaluev/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-11-24T09:27:37Z","updated_at":"2018-11-26T19:31:30Z","closed_at":"2018-11-26T19:31:30Z","author_association":"NONE","body":"The constructor `Server::new` does not restrict the type parameter for the executor, so it can be used with any mistakenly used argument in that position, e.g., with a `reactor::Handle` from crate `tokio` (an easy mistake to make, since the examples use the reactor handle from `tokio-core` which does implement `Executor`).\r\nThis then results in daunting compiler error messages down the road when a `Connection` accepted by the server is used. When the user-provided types are generated for tower-grpc, it requires some sleuthing work to track back to what is at fault here:\r\n\r\n> no method named `map_err` found for type `tower_h2::server::Connection<tokio::net::TcpStream, my_proto::server::NodeServer<MyGrpcServer>, tokio::reactor::Handle, my_proto::server::node::ResponseBody<MyGrpcServer>, ()>` in the current scope\r\n\r\n    note: the method `map_err` exists but the following trait bounds were not satisfied:\r\n              `tower_h2::server::Connection<tokio::net::TcpStream, my_proto::server::NodeServer<MyGrpcServer>, tokio::reactor::Handle, my_proto::server::node::ResponseBody<MyGrpcServer>, ()> : futures::Future`\r\n              `&mut tower_h2::server::Connection<tokio::net::TcpStream, my_proto::server::NodeServer<MyGrpcServer>, tokio::reactor::Handle, my_proto::server::node::ResponseBody<MyGrpcServer>, ()> : futures::Future`\r\n              `&mut tower_h2::server::Connection<tokio::net::TcpStream, my_proto::server::NodeServer<MyGrpcServer>, tokio::reactor::Handle, my_proto::server::node::ResponseBody<MyGrpcServer>, ()> : futures::Stream` [E0599]"}}
{"actor":{"display_login":"seanmonstar"}}