Skip to content

Commit 041b2ce

Browse files
committed
Make encoding support default
Users will currently experience a runtime failure if they encounter data of a non-UTF-8 encoding. It's probably better to make encoding support opt-out, to prevent users from running into this problem in production after doing their testing with simple UTF-8 documents. Opting out could yield some performance benefits and reduce binary size but but it's something you should probably conciously decide not to use.
1 parent a54f6c2 commit 041b2ce

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ harness = false
4343
path = "benches/macrobenches.rs"
4444

4545
[features]
46-
default = []
46+
default = ["encoding"]
4747

4848
## Enables support for asynchronous reading from `tokio`'s IO-Traits by enabling
4949
## [reading events] from types implementing [`tokio::io::AsyncBufRead`].

Changelog.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212

1313
### New Features
1414

15+
- [#441]: Made the `encoding` feature default. If you only need support for UTF-8
16+
you can opt out of it with --no-default-features.
17+
1518
### Bug Fixes
1619

1720
- [#490]: Ensure that serialization of map keys always produces valid XML names.
@@ -65,6 +68,7 @@
6568
- [#489]: Reduced the size of the package uploaded into the crates.io by excluding
6669
tests, examples, and benchmarks.
6770

71+
[#441]: https://github.com/tafia/quick-xml/pull/441
6872
[#481]: https://github.com/tafia/quick-xml/pull/481
6973
[#489]: https://github.com/tafia/quick-xml/pull/489
7074

0 commit comments

Comments
 (0)