diff --git a/CHANGELOG.md b/CHANGELOG.md index 1293031..5703301 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed - Decoding an optional is about 18% cheaper, by letting each type's own unpacker recognise a nil header instead of testing for one beforehand +### Removed +- `omit_nulls` and `omit_defaults` on `UnionAsMapOptions`, which were never read; a union-as-map always writes exactly one entry, so there is nothing to omit + ### Fixed - Decoding an enum whose tag names no field returns `error.InvalidEnumTag` instead of being illegal behavior; non-exhaustive enums still accept unknown tags diff --git a/src/union.zig b/src/union.zig index 0958d8e..b76ea08 100644 --- a/src/union.zig +++ b/src/union.zig @@ -35,8 +35,6 @@ pub const UnionAsMapOptions = struct { field_name_prefix: u8, field_index, }, - omit_nulls: bool = true, - omit_defaults: bool = false, }; pub const UnionAsTaggedOptions = struct {