Skip to content

Commit acfe2b9

Browse files
use a const for the png content type
1 parent ba29462 commit acfe2b9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,8 @@ pub struct Png(pub Vec<u8>);
438438

439439
impl IntoResponse for Png {
440440
fn into_response(self) -> Response {
441-
let headers = [("Content-Type", "image/png")];
441+
static PNG_CTYPE: HeaderValue = HeaderValue::from_static("image/png");
442+
let headers = [(CONTENT_TYPE, PNG_CTYPE.clone())];
442443
(headers, self.0).into_response()
443444
}
444445
}

0 commit comments

Comments
 (0)