feat(rt): introduce rt::Executor trait

The `hyper::rt::Executor` trait allows defining custom executors to be
used with hyper's `Client` and `Server`.

Closes #1944

BREAKING CHANGE: Any type passed to the `executor` builder methods must
  now implement `hyper::rt::Executor`.

  `hyper::rt::spawn` usage should be replaced with `tokio::task::spawn`.

  `hyper::rt::run` usage should be replaced with `#[tokio::main]` or
  managing a `tokio::runtime::Runtime` manually.
This commit is contained in:
Sean McArthur
2019-12-04 11:15:09 -08:00
parent cb3f39c2dc
commit 6ae5889f83
3 changed files with 2 additions and 5 deletions

View File

@@ -1,5 +1,3 @@
fn main() {}
/*
#![deny(warnings)]
use std::cell::Cell;
@@ -74,4 +72,3 @@ where
tokio::task::spawn_local(fut);
}
}
*/