mirror of
https://github.com/tokio-rs/axum.git
synced 2026-09-02 00:00:22 +02:00
Remove buffer from BoxRoute (#270)
Boxing a service normally means using `tower::util::BoxService`. That doesn't implement `Clone` however so normally I had been combining it with `Buffer` to get that. But recently I discovered https://github.com/dtolnay/dyn-clone which makes it possible to clone trait objects. So this adds a new internal utility called `CloneBoxService` which replaces the previous `BoxService` + `Buffer` combo in `BoxRoute`. I'll investigate upstreaming that to tower. I think it makes sense there since box + clone is quite a common need.
This commit is contained in:
@@ -1004,7 +1004,6 @@
|
||||
#[macro_use]
|
||||
pub(crate) mod macros;
|
||||
|
||||
mod buffer;
|
||||
mod error;
|
||||
mod json;
|
||||
mod util;
|
||||
|
||||
Reference in New Issue
Block a user