-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
A-serverArea: server.Area: server.E-easyEffort: easy. A task that would be a great starting point for a new contributor.Effort: easy. A task that would be a great starting point for a new contributor.
Description
Similar to #1638 but I think the problem is about the executor:
let addr: &str = ...;
let exec = tokio::runtime::current_thread::TaskExecutor::current();
let server = hyper::Server::bind(&addr.parse().expect("parsing address"))
.executor(exec)
.serve(new_service);
let _ = server.local_addr();
// no method named `local_addr` found for type `hyper::server::Server<hyper::server::tcp::AddrIncoming, [[email protected]:206:5: 216:6 main:_], tokio_current_thread::TaskExecutor>` in the current scope
Simply removing the .executor(exec)
line solves the problem
I can't tell why local_addr
depends on the executor's type.
Metadata
Metadata
Assignees
Labels
A-serverArea: server.Area: server.E-easyEffort: easy. A task that would be a great starting point for a new contributor.Effort: easy. A task that would be a great starting point for a new contributor.