Move misc types (#213)

This commit is contained in:
Carl Lerche 2019-03-27 19:56:44 -07:00 committed by GitHub
parent f1bb22a296
commit 3a407c2775
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 6 deletions

View File

@ -2,6 +2,7 @@
#[cfg(feature = "either")]
extern crate either as _either;
#[macro_use]
extern crate futures;
#[cfg(feature = "io")]
extern crate tokio_io;
@ -14,7 +15,9 @@ mod either;
#[cfg(feature = "io")]
mod make_connection;
mod make_service;
mod oneshot;
mod option;
mod ready;
mod sealed;
mod service_fn;
@ -25,7 +28,9 @@ pub use crate::either::EitherService;
#[cfg(feature = "io")]
pub use crate::make_connection::MakeConnection;
pub use crate::make_service::MakeService;
pub use crate::oneshot::Oneshot;
pub use crate::option::OptionService;
pub use crate::ready::Ready;
pub use crate::service_fn::ServiceFn;
pub mod error {

View File

@ -20,7 +20,7 @@ impl<S, Req> Oneshot<S, Req>
where
S: Service<Req>,
{
pub(super) fn new(svc: S, req: Req) -> Self {
pub fn new(svc: S, req: Req) -> Self {
Oneshot {
state: State::NotReady(svc, req),
}

View File

@ -16,7 +16,7 @@ impl<T, Request> Ready<T, Request>
where
T: Service<Request>,
{
pub(super) fn new(service: T) -> Self {
pub fn new(service: T) -> Self {
Ready {
inner: Some(service),
_p: PhantomData,

View File

@ -5,8 +5,6 @@ mod apply;
mod from_err;
mod map;
mod map_err;
mod oneshot;
mod ready;
mod then;
pub use self::and_then::AndThen;
@ -14,8 +12,6 @@ pub use self::apply::Apply;
pub use self::from_err::FromErr;
pub use self::map::Map;
pub use self::map_err::MapErr;
pub use self::oneshot::Oneshot;
pub use self::ready::Ready;
pub use self::then::Then;
// `tower-util` re-exports
@ -23,7 +19,9 @@ pub use tower_util::BoxService;
pub use tower_util::CallAll;
pub use tower_util::CallAllUnordered;
pub use tower_util::EitherService;
pub use tower_util::Oneshot;
pub use tower_util::OptionService;
pub use tower_util::Ready;
pub use tower_util::ServiceFn;
pub use tower_util::UnsyncBoxService;