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

improve typed header macro (#2481)

This commit is contained in:
Rob Ede
2021-12-02 15:25:39 +00:00
committed by GitHub
parent 075d871e63
commit 2a72bdae09
29 changed files with 147 additions and 100 deletions

View File

@@ -25,7 +25,7 @@ use crate::HttpMessage;
/// in Range; otherwise, send me the entire representation.
///
/// # ABNF
/// ```text
/// ```plain
/// If-Range = entity-tag / HTTP-date
/// ```
///
@@ -107,10 +107,11 @@ impl IntoHeaderValue for IfRange {
}
#[cfg(test)]
mod test_if_range {
mod test_parse_and_format {
use std::str;
use super::IfRange as HeaderField;
use crate::http::header::*;
use std::str;
crate::http::header::common_header_test!(test1, vec![b"Sat, 29 Oct 1994 19:43:31 GMT"]);
crate::http::header::common_header_test!(test2, vec![b"\"abc\""]);