From 23e993689a548b0b31e64cb13530bfbbb45d3dc4 Mon Sep 17 00:00:00 2001 From: Malloc Voidstar <1284317+AlyoshaVasilieva@users.noreply.github.com> Date: Sat, 2 Oct 2021 12:25:03 -0700 Subject: [PATCH] Rename Decompressor to BrotliDecoder to align with gzip --- src/response.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/response.rs b/src/response.rs index becd9ed..c650d5c 100644 --- a/src/response.rs +++ b/src/response.rs @@ -22,7 +22,7 @@ use encoding_rs::Encoding; use flate2::read::GzDecoder; #[cfg(feature = "brotli")] -use brotli_decompressor::Decompressor; +use brotli_decompressor::Decompressor as BrotliDecoder; pub const DEFAULT_CONTENT_TYPE: &str = "text/plain"; pub const DEFAULT_CHARACTER_SET: &str = "utf-8"; @@ -549,7 +549,7 @@ impl Compression { fn wrap_reader(self, reader: Box) -> Box { match self { #[cfg(feature = "brotli")] - Compression::Brotli => Box::new(Decompressor::new(reader, 4096)), + Compression::Brotli => Box::new(BrotliDecoder::new(reader, 4096)), #[cfg(feature = "gzip")] Compression::Gzip => Box::new(GzDecoder::new(reader)), }