You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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, [closure@main.rs: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.
The text was updated successfully, but these errors were encountered:
Similar to #1638 but I think the problem is about the executor:
Simply removing the
.executor(exec)
line solves the problemI can't tell why
local_addr
depends on the executor's type.The text was updated successfully, but these errors were encountered: