Commit
+9 -0 +/-1 browse
1 | diff --git a/src/rewrite.rs b/src/rewrite.rs |
2 | index 05b6845..f7b88a4 100644 |
3 | --- a/src/rewrite.rs |
4 | +++ b/src/rewrite.rs |
5 | @@ -1,5 +1,8 @@ |
6 | use mail_parser::{HeaderName, Message, MessageParser}; |
7 | |
8 | + #[cfg(feature = "authentication")] |
9 | + use mail_auth::common::headers::Writer; |
10 | + |
11 | /// Basically a hack that can modify messages expensively re-parsing them on |
12 | /// each modificaiton. The mail_parser project has mentioned adding this |
13 | /// functionality and perhaps this could be upstreamed. |
14 | @@ -48,6 +51,12 @@ impl<'a> Rewrite<'a> { |
15 | #[derive(Default)] |
16 | pub struct Header(Vec<u8>); |
17 | |
18 | + #[cfg(feature = "authentication")] |
19 | + impl Writer for Header { |
20 | + fn write(&mut self, buf: &[u8]) { |
21 | + self.0.write(buf); |
22 | + } |
23 | + } |
24 | |
25 | #[cfg(test)] |
26 | mod test { |