Run rustfmt on c76056b and f70c36e

This commit is contained in:
Yinuo Deng 2023-04-14 23:59:23 +08:00
parent f70c36eff0
commit c66233e225
No known key found for this signature in database
GPG Key ID: 6DF6E347982C88F8
1 changed files with 4 additions and 2 deletions

View File

@ -345,8 +345,10 @@ impl HttpResponseBuilder {
let parts = self.inner().unwrap();
let length = parts.headers.get(header::CONTENT_LENGTH).unwrap().to_str();
if let Ok(length) = length { // length is now of type &str
if let Ok(length) = length.parse::<u64>() { //length is now of type u64
if let Ok(length) = length {
// length is now of type &str
if let Ok(length) = length.parse::<u64>() {
//length is now of type u64
// Set no_chunking
// Since no_chuking() uses insert_header(),
// this will not lead to duplicated header even if it exists