feat(service): rename Service to HttpService, re-export tower::Service`

The only important trait for a user is the `tower::Service` trait, which
is now available also at `hyper::service::Service`. The other "trait
aliases" are no longer publicly exported, as people thought they had to
implement them.

Also removes dependency on `tower-make`, which is trivial but otherwise
shouldn't affect anyone.

Closes #1959
This commit is contained in:
Sean McArthur
2019-10-18 16:55:15 -07:00
parent ca5836f1ec
commit 4f2743991c
15 changed files with 260 additions and 271 deletions

View File

@@ -1,10 +1,11 @@
#![deny(warnings)]
use hyper::{Body, Request, Response, Server};
use tower_service::Service;
use futures_util::future;
use std::task::{Context, Poll};
use futures_util::future;
use hyper::{Body, Request, Response, Server};
use hyper::service::Service;
const ROOT: &'static str = "/";
#[derive(Debug)]