We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
impl From<http::HeaderName> for Vary
1 parent 66371a0 commit 12fb1d7Copy full SHA for 12fb1d7
1 file changed
src/common/vary.rs
@@ -1,4 +1,4 @@
1
-use http::HeaderValue;
+use http::{HeaderName, HeaderValue};
2
3
use crate::util::FlatCsv;
4
@@ -53,6 +53,12 @@ impl Vary {
53
}
54
55
56
+impl From<HeaderName> for Vary {
57
+ fn from(name: HeaderName) -> Self {
58
+ Vary(HeaderValue::from(name).into())
59
+ }
60
+}
61
+
62
/*
63
test_vary {
64
test_header!(test1, vec![b"accept-encoding, accept-language"]);
0 commit comments