1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-06-25 22:49:21 +02:00

use iota for more content-length insertions (#2050)

This commit is contained in:
Rob Ede
2021-03-07 19:29:02 +00:00
committed by GitHub
parent 880b863f95
commit ca69b6577e
8 changed files with 49 additions and 45 deletions

View File

@ -632,10 +632,9 @@ mod tests {
let mut res: Response<()> =
Response::new(StatusCode::SWITCHING_PROTOCOLS).into_body::<()>();
res.headers_mut().insert(DATE, HeaderValue::from_static(""));
res.headers_mut()
.insert(DATE, HeaderValue::from_static(&""));
res.headers_mut()
.insert(CONTENT_LENGTH, HeaderValue::from_static(&"0"));
.insert(CONTENT_LENGTH, HeaderValue::from_static("0"));
let _ = res.encode_headers(
&mut bytes,