feat(lib): add optional tcp feature, split from runtime
The `HttpConnector` and `AddrListener` types which make use of `tokio::tcp` have been made their own optional feature. This allows using them without requiring the *full* tokio runtime.
This commit is contained in:
@@ -50,7 +50,7 @@ impl Exec {
|
||||
{
|
||||
match *self {
|
||||
Exec::Default => {
|
||||
#[cfg(feature = "runtime")]
|
||||
#[cfg(feature = "tcp")]
|
||||
{
|
||||
use std::error::Error as StdError;
|
||||
|
||||
@@ -81,7 +81,7 @@ impl Exec {
|
||||
crate::Error::new_execute(TokioSpawnError)
|
||||
})
|
||||
}
|
||||
#[cfg(not(feature = "runtime"))]
|
||||
#[cfg(not(feature = "tcp"))]
|
||||
{
|
||||
// If no runtime, we need an executor!
|
||||
panic!("executor must be set")
|
||||
|
||||
Reference in New Issue
Block a user