Remove tower from axum's public API (#229)

Instead rely on `tower-service` and `tower-layer`. `tower` itself is
only used internally.

Fixes https://github.com/tokio-rs/axum/issues/186
This commit is contained in:
David Pedersen
2021-08-21 15:01:30 +02:00
committed by GitHub
parent 35ea7ca0ff
commit f8a0d81d79
27 changed files with 102 additions and 50 deletions
+3 -1
View File
@@ -1,5 +1,6 @@
#![allow(clippy::blacklisted_name)]
use crate::BoxError;
use crate::{
extract,
handler::{any, delete, get, on, patch, post, Handler},
@@ -23,7 +24,8 @@ use std::{
task::{Context, Poll},
time::Duration,
};
use tower::{make::Shared, service_fn, BoxError, Service};
use tower::{make::Shared, service_fn};
use tower_service::Service;
mod get_to_head;
mod handle_error;
+2 -4
View File
@@ -1,10 +1,8 @@
use super::*;
use crate::{extract::OriginalUri, response::IntoResponse, Json};
use serde_json::{json, Value};
use tower::{limit::ConcurrencyLimitLayer, timeout::TimeoutLayer};
use crate::{extract::OriginalUri, response::IntoResponse, Json};
use super::*;
#[tokio::test]
async fn basic() {
let one = Router::new()