File tree Expand file tree Collapse file tree 1 file changed +8
-12
lines changed Expand file tree Collapse file tree 1 file changed +8
-12
lines changed Original file line number Diff line number Diff line change @@ -183,40 +183,36 @@ where
183
183
184
184
#[ doc( hidden) ]
185
185
pub fn apply_compression_config (
186
- self ,
186
+ mut self ,
187
187
accept_encodings : EnabledCompressionEncodings ,
188
188
send_encodings : EnabledCompressionEncodings ,
189
189
) -> Self {
190
- let mut this = self ;
191
-
192
190
for & encoding in CompressionEncoding :: ENCODINGS {
193
191
if accept_encodings. is_enabled ( encoding) {
194
- this = this . accept_compressed ( encoding) ;
192
+ self = self . accept_compressed ( encoding) ;
195
193
}
196
194
if send_encodings. is_enabled ( encoding) {
197
- this = this . send_compressed ( encoding) ;
195
+ self = self . send_compressed ( encoding) ;
198
196
}
199
197
}
200
198
201
- this
199
+ self
202
200
}
203
201
204
202
#[ doc( hidden) ]
205
203
pub fn apply_max_message_size_config (
206
- self ,
204
+ mut self ,
207
205
max_decoding_message_size : Option < usize > ,
208
206
max_encoding_message_size : Option < usize > ,
209
207
) -> Self {
210
- let mut this = self ;
211
-
212
208
if let Some ( limit) = max_decoding_message_size {
213
- this = this . max_decoding_message_size ( limit) ;
209
+ self = self . max_decoding_message_size ( limit) ;
214
210
}
215
211
if let Some ( limit) = max_encoding_message_size {
216
- this = this . max_encoding_message_size ( limit) ;
212
+ self = self . max_encoding_message_size ( limit) ;
217
213
}
218
214
219
- this
215
+ self
220
216
}
221
217
222
218
/// Handle a single unary gRPC request.
You can’t perform that action at this time.
0 commit comments