Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove future re-exports #133

Merged
merged 3 commits into from
Aug 7, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## Breaking changes

- `extract::extractor_middleware::ExtractorMiddlewareResponseFuture` moved
to `extract::extractor_middleware::future::ResponseFuture` ([#133](https://github.com/tokio-rs/axum/pull/133))
- `routing::BoxRouteFuture` moved to `routing::future::BoxRouteFuture` ([#133](https://github.com/tokio-rs/axum/pull/133))
- `routing::EmptyRouterFuture` moved to `routing::future::EmptyRouterFuture` ([#133](https://github.com/tokio-rs/axum/pull/133))
- `routing::RouteFuture` moved to `routing::future::RouteFuture` ([#133](https://github.com/tokio-rs/axum/pull/133))
- `service::BoxResponseBodyFuture` moved to `service::future::BoxResponseBodyFuture` ([#133](https://github.com/tokio-rs/axum/pull/133))
- The following types no longer implement `Copy` ([#132](https://github.com/tokio-rs/axum/pull/132)):
- `EmptyRouter`
- `ExtractorMiddleware`
Expand Down
7 changes: 0 additions & 7 deletions src/extract/extractor_middleware.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down
2 changes: 1 addition & 1 deletion src/handler/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
6 changes: 1 addition & 5 deletions src/routing.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//! Routing between [`Service`]s.

use self::future::{BoxRouteFuture, EmptyRouterFuture, RouteFuture};
use crate::{
body::{box_body, BoxBody},
buffer::MpscBuffer,
Expand Down Expand Up @@ -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 {
Expand Down
6 changes: 1 addition & 5 deletions src/service/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand All @@ -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.
Expand Down