Skip to content

Commit 9cadc33

Browse files
authored
Feature gate report module (#39)
Put the report module behind a feature gate. One practical reason for doing this is that the quick-xml package explicitly disables non-utf8 support without enabling the encoding feature. Other packages that depend on quick-xml like RSS libraries often need support for non-utf8 encoding and this creates a compile time error.
1 parent b1d4e62 commit 9cadc33

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Cargo.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,10 @@ resolver = "2"
1616
doctest = false
1717

1818
[features]
19-
default = ["ring", "rustls-pemfile"]
19+
default = ["ring", "rustls-pemfile", "report"]
2020
rust-crypto = ["ed25519-dalek", "rsa", "sha1", "sha2"]
2121
generate = ["rsa", "rand"]
22+
report = ["quick-xml"]
2223
test = []
2324

2425
[dependencies]
@@ -29,7 +30,7 @@ lru-cache = "0.1.2"
2930
mail-parser = { version = "0.9", features = ["ludicrous_mode", "full_encoding"] }
3031
mail-builder = { version = "0.3", features = ["ludicrous_mode"] }
3132
parking_lot = "0.12.0"
32-
quick-xml = "0.36"
33+
quick-xml = { version = "0.36", optional = true }
3334
ring = { version = "0.17", optional = true }
3435
rsa = { version = "0.9.6", optional = true }
3536
rustls-pemfile = { version = "2", optional = true }

src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ pub mod common;
3636
pub mod dkim;
3737
pub mod dmarc;
3838
pub mod mta_sts;
39+
#[cfg(feature = "report")]
3940
pub mod report;
4041
pub mod spf;
4142

0 commit comments

Comments
 (0)