@@ -30,8 +30,7 @@ impl CompressionType {
3030 . iter ( )
3131 . map ( |t| t. header_value ( ) . to_string ( ) )
3232 . collect :: < Vec < String > > ( )
33- . join ( ", " )
34- . to_string ( ) ,
33+ . join ( ", " ) ,
3534 }
3635 }
3736 pub fn from_encoding_header ( encoding : & str ) -> Result < CompressionType , SubgraphExecutorError > {
@@ -63,45 +62,45 @@ impl CompressionType {
6362 CompressionType :: Gzip => {
6463 let mut decoder = GzipDecoder :: new ( body. as_ref ( ) ) ;
6564 let mut buf = Vec :: new ( ) ;
66- let _ = decoder. read_to_end ( & mut buf) . await . map_err ( |e| {
65+ decoder. read_to_end ( & mut buf) . await . map_err ( |e| {
6766 SubgraphExecutorError :: DecompressionFailed (
6867 self . header_value ( ) ,
6968 e. to_string ( ) ,
7069 )
71- } ) ;
70+ } ) ? ;
7271 Ok ( Bytes :: from ( buf) )
7372 }
7473 CompressionType :: Deflate => {
7574 let mut decoder = DeflateDecoder :: new ( body. as_ref ( ) ) ;
7675 let mut buf = Vec :: new ( ) ;
77- let _ = decoder. read_to_end ( & mut buf) . await . map_err ( |e| {
76+ decoder. read_to_end ( & mut buf) . await . map_err ( |e| {
7877 SubgraphExecutorError :: DecompressionFailed (
7978 self . header_value ( ) ,
8079 e. to_string ( ) ,
8180 )
82- } ) ;
81+ } ) ? ;
8382 Ok ( Bytes :: from ( buf) )
8483 }
8584 CompressionType :: Brotli => {
8685 let mut decoder = BrotliDecoder :: new ( body. as_ref ( ) ) ;
8786 let mut buf = Vec :: new ( ) ;
88- let _ = decoder. read_to_end ( & mut buf) . await . map_err ( |e| {
87+ decoder. read_to_end ( & mut buf) . await . map_err ( |e| {
8988 SubgraphExecutorError :: DecompressionFailed (
9089 self . header_value ( ) ,
9190 e. to_string ( ) ,
9291 )
93- } ) ;
92+ } ) ? ;
9493 Ok ( Bytes :: from ( buf) )
9594 }
9695 CompressionType :: Zstd => {
9796 let mut decoder = ZstdDecoder :: new ( body. as_ref ( ) ) ;
9897 let mut buf = Vec :: new ( ) ;
99- let _ = decoder. read_to_end ( & mut buf) . await . map_err ( |e| {
98+ decoder. read_to_end ( & mut buf) . await . map_err ( |e| {
10099 SubgraphExecutorError :: DecompressionFailed (
101100 self . header_value ( ) ,
102101 e. to_string ( ) ,
103102 )
104- } ) ;
103+ } ) ? ;
105104 Ok ( Bytes :: from ( buf) )
106105 }
107106 CompressionType :: Multiple ( types) => {
0 commit comments