Remove future re-exports (#133)

These types were moved around in
https://github.com/tokio-rs/axum/pull/130 but re-export from their old
location for backwards compatibility.

This removes the re-exports.
This commit is contained in:
David Pedersen
2021-08-07 16:22:53 +02:00
committed by GitHub
parent a0a19c8362
commit 123b1b3c5e
5 changed files with 9 additions and 18 deletions
-7
View File
@@ -182,13 +182,6 @@ where
}
}
#[doc(hidden)]
#[deprecated(
since = "0.1.3",
note = "Use axum::extract::extractor_middleware::ResponseFuture"
)]
pub type ExtractorMiddlewareResponseFuture<B, S, E> = ResponseFuture<B, S, E>;
pin_project! {
/// Response future for [`ExtractorMiddleware`].
#[allow(missing_debug_implementations)]
+1 -1
View File
@@ -4,7 +4,7 @@ use crate::{
body::{box_body, BoxBody},
extract::FromRequest,
response::IntoResponse,
routing::{EmptyRouter, MethodFilter, RouteFuture},
routing::{future::RouteFuture, EmptyRouter, MethodFilter},
service::HandleError,
};
use async_trait::async_trait;
+1 -5
View File
@@ -1,5 +1,6 @@
//! Routing between [`Service`]s.
use self::future::{BoxRouteFuture, EmptyRouterFuture, RouteFuture};
use crate::{
body::{box_body, BoxBody},
buffer::MpscBuffer,
@@ -27,11 +28,6 @@ use tower_http::map_response_body::MapResponseBodyLayer;
pub mod future;
// for backwards compatibility
// TODO: remove these in 0.2
#[doc(hidden)]
pub use self::future::{BoxRouteFuture, EmptyRouterFuture, RouteFuture};
/// A filter that matches one or more HTTP methods.
#[derive(Debug, Copy, Clone)]
pub enum MethodFilter {
+1 -5
View File
@@ -89,7 +89,7 @@
use crate::{
body::BoxBody,
response::IntoResponse,
routing::{EmptyRouter, MethodFilter, RouteFuture},
routing::{future::RouteFuture, EmptyRouter, MethodFilter},
};
use bytes::Bytes;
use http::{Request, Response};
@@ -103,10 +103,6 @@ use tower::{util::Oneshot, BoxError, Service, ServiceExt as _};
pub mod future;
// for backwards compatibility
#[doc(hidden)]
pub use future::BoxResponseBodyFuture;
/// Route requests to the given service regardless of the HTTP method.
///
/// See [`get`] for an example.