File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -40,3 +40,14 @@ impl<'a> ToHeaderValues for &'a str {
40
40
Ok ( Some ( value) . into_iter ( ) )
41
41
}
42
42
}
43
+
44
+ impl ToHeaderValues for String {
45
+ type Iter = option:: IntoIter < HeaderValue > ;
46
+
47
+ fn to_header_values ( & self ) -> crate :: Result < Self :: Iter > {
48
+ let value = self
49
+ . parse ( )
50
+ . map_err ( |err| io:: Error :: new ( io:: ErrorKind :: Other , err) ) ?;
51
+ Ok ( Some ( value) . into_iter ( ) )
52
+ }
53
+ }
Original file line number Diff line number Diff line change @@ -188,7 +188,8 @@ pub struct TrailersSender {
188
188
189
189
impl TrailersSender {
190
190
/// Create a new instance of `TrailersSender`.
191
- pub ( crate ) fn new ( sender : Sender < crate :: Result < Trailers > > ) -> Self {
191
+ #[ doc( hidden) ]
192
+ pub fn new ( sender : Sender < crate :: Result < Trailers > > ) -> Self {
192
193
Self { sender }
193
194
}
194
195
You can’t perform that action at this time.
0 commit comments