mirror of
https://github.com/fafhrd91/actix-web
synced 2025-06-26 06:57:43 +02:00
clippy
This commit is contained in:
@ -480,6 +480,7 @@ impl ClientRequest {
|
||||
// supported, so we cannot guess Accept-Encoding HTTP header.
|
||||
if slf.response_decompress {
|
||||
// Set Accept-Encoding with compression algorithm awc is built with.
|
||||
#[allow(clippy::vec_init_then_push)]
|
||||
#[cfg(feature = "__compress")]
|
||||
let accept_encoding = {
|
||||
let mut encoding = vec![];
|
||||
@ -496,7 +497,11 @@ impl ClientRequest {
|
||||
#[cfg(feature = "compress-zstd")]
|
||||
encoding.push("zstd");
|
||||
|
||||
assert!(!encoding.is_empty(), "encoding cannot be empty unless __compress feature has been explictily enabled.");
|
||||
assert!(
|
||||
!encoding.is_empty(),
|
||||
"encoding can not be empty unless __compress feature has been explicitly enabled"
|
||||
);
|
||||
|
||||
encoding.join(", ")
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user