Skip to content

Commit afd6c47

Browse files
committed
refactor: use CLEAR_SITE_DATA constant
1 parent fad56d1 commit afd6c47

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

actix-web-lab/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ spa = ["actix-files"]
4848
[dependencies]
4949
actix-web-lab-derive = { version = "0.24", optional = true }
5050

51-
actix-http = "3"
51+
actix-http = "3.10"
5252
actix-router = "0.5"
5353
actix-service = "2"
5454
actix-utils = "3"

actix-web-lab/src/clear_site_data.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ use std::{
1111
use actix_http::{
1212
HttpMessage,
1313
error::ParseError,
14-
header::{Header, HeaderName, HeaderValue, InvalidHeaderValue, TryIntoHeaderValue},
14+
header::{
15+
CLEAR_SITE_DATA, Header, HeaderName, HeaderValue, InvalidHeaderValue, TryIntoHeaderValue,
16+
},
1517
};
1618

1719
use crate::header::{fmt_comma_delimited_quoted_strings, from_comma_delimited_quoted_strings};
@@ -80,8 +82,7 @@ impl TryIntoHeaderValue for ClearSiteData {
8082

8183
impl Header for ClearSiteData {
8284
fn name() -> HeaderName {
83-
// TODO: use actix-http's constant after its next release
84-
HeaderName::from_static("clear-site-data")
85+
CLEAR_SITE_DATA
8586
}
8687

8788
fn parse<M: HttpMessage>(msg: &M) -> Result<Self, ParseError> {

0 commit comments

Comments
 (0)