Skip to content

Commit

Permalink
fix: Make CompressionLayer::default() use ::new()
Browse files Browse the repository at this point in the history
  • Loading branch information
NeoLegends committed Sep 20, 2021
1 parent c657ca9 commit 1af2eef
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tower-http/src/compression/layer.rs
Expand Up @@ -8,12 +8,18 @@ use tower_layer::Layer;
/// `Content-Encoding` header to responses.
///
/// See the [module docs](crate::compression) for more details.
#[derive(Clone, Debug, Default)]
#[derive(Clone, Debug)]
pub struct CompressionLayer {
accept: AcceptEncoding,
min_size: u16,
}

impl Default for CompressionLayer {
fn default() -> Self {
Self::new()
}
}

impl<S> Layer<S> for CompressionLayer {
type Service = Compression<S>;

Expand Down

0 comments on commit 1af2eef

Please sign in to comment.