Releases: ModProg/derive-where
Releases · ModProg/derive-where
`Clone` skip group and `Zeroize` variant skip fix
Added
- Allow skipping fields for
Clone, callingDefault::default()instead.
Note:Cloneis excluded from blanket skipping and can only be used with
selective skipping to avoid this being a breaking change.
Fixed
- Support skipping only some variants with
Zeroize.
Support HRTB and various fixes
Added
- Allow lifetime
for<'a, ...>bounds in non-bounded generic parameters.
Changed
- Use the
Copyimplementation forCloneand theOrdimplementation for
PartialOrdwhen custom bounds are present.
Fixed
- Support skipping only some variants with
ZeroizeOnDrop. - Only generate single call to
zeroize()withZeroizeOnDropon multiple
fields or variants.
Generate `#[automatically_derived]`
Fixed
- Apply
#[automatically_derived]to all generated implementations.
Fix `Copy + Clone` implementation
Fixed
- Use the
Copyimplementation forCloneonly if no bounds are present.
Make discriminant default type validation edition-proof
Changed
- Use safe casting in
PartialOrdandOrdimplementations in more cases when
possible. - Avoid unnecessarily validating the default discriminant type in some cases.
- Apply default enum discriminant type validation to all representations and
make it cross-edition safe.
Take representation into account when getting discriminant
Fixed
- Take representation into account when determining the discriminant type.
Changed
- Use stable methods to retrieve the discriminant in
PartialOrdandOrd
implementations. Safe methods used with thesafecrate feature don't use
recursive matches anymore, significantly improving the performance.
Fix `PartialOrd` implementation using `Ord` with bounds [YANKED]
Fixed
- Don't use
OrdinPartialOrdimplementations if using any bounds.
Fix field name collisions [YANKED]
Fixed
- Avoid collisions between field names and trait method parameters.
Changed
PartialOrdimplementations now useOrdif applicable.
Fix Raw Identifiers [YANKED]
Fixed
- Correctly handle raw identifiers in named fields.
`syn` v2.0 update [YANKED]
Changed
- Updated
synto v2. Debugoutput of structs that skip fields appearsnon_exhaustivenow.
Deprecated
- The
crateattribute now takes a bare path instead of a path inside a string
literal.