1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-09-02 01:31:57 +02:00

Don't leak internal macros (#2290)

This commit is contained in:
Ibraheem Ahmed
2021-06-25 07:25:50 -04:00
committed by GitHub
parent 767e4efe22
commit 2eacb735a4
23 changed files with 113 additions and 112 deletions

View File

@@ -1,6 +1,6 @@
use super::{EntityTag, IF_MATCH};
crate::__define_common_header! {
crate::http::header::common_header! {
/// `If-Match` header, defined in
/// [RFC7232](https://tools.ietf.org/html/rfc7232#section-3.1)
///
@@ -53,18 +53,18 @@ crate::__define_common_header! {
(IfMatch, IF_MATCH) => {Any / (EntityTag)+}
test_if_match {
crate::__common_header_test!(
crate::http::header::common_header_test!(
test1,
vec![b"\"xyzzy\""],
Some(HeaderField::Items(
vec![EntityTag::new(false, "xyzzy".to_owned())])));
crate::__common_header_test!(
crate::http::header::common_header_test!(
test2,
vec![b"\"xyzzy\", \"r2d2xxxx\", \"c3piozzzz\""],
Some(HeaderField::Items(
vec![EntityTag::new(false, "xyzzy".to_owned()),
EntityTag::new(false, "r2d2xxxx".to_owned()),
EntityTag::new(false, "c3piozzzz".to_owned())])));
crate::__common_header_test!(test3, vec![b"*"], Some(IfMatch::Any));
crate::http::header::common_header_test!(test3, vec![b"*"], Some(IfMatch::Any));
}
}