Skip to content

Releases: TedDriggs/darling

v0.23.0

03 Dec 15:49

Choose a tag to compare

  • Bump MSRV to 1.88.0; there have been no code changes that caused this, but due to dependency issues CI no longer works on 1.56.0 #357
  • Revert dependency version pins which caused problems #385

v0.22.0

02 Dec 19:04

Choose a tag to compare

YANKED Pinned dependencies made this version cause conflicts with other crates.

  • BREAKING: Remove fnv dependency, as runtime performance gain does not justify additional dependency. This was exposed to users of darling::usage, so it may be breaking for them #373
  • Add #[darling(default = || expr(val))] support, allowing a closure where a path was previously required #380
  • Preserve span information for paths given to darling::util::Callable as literal strings
  • Fix some documentation typos

v0.21.3

22 Aug 15:40

Choose a tag to compare

  • Fix: Forward Override::<T>::from_expr to T::from_expr #371

v0.21.2

14 Aug 22:26

Choose a tag to compare

  • Add #[darling(from_expr = ...)] when deriving FromMeta to support overriding the key-value form #369
  • Keep parsing the body and type params even if there are errors from parsing attributes. #7
  • Support #[darling(with = ...)] on the generics field when deriving FromDeriveInput.
  • Return an error, rather than panicking, when doing shape validation on a union. #365

v0.21.1

04 Aug 14:29

Choose a tag to compare

  • Track all alternate field names, and show them in error message if there aren't too many. #325
  • Track all alternate values for enum variants, and show them in error messages if there aren't too many. #362

v0.21.0

10 Jul 18:46

Choose a tag to compare

  • Potentially breaking: Emit error when an attribute path is present in both attributes and forward_attrs. #336
  • Support parsing attributes which contain keywords #238
  • Add SpannedValue::into_inner #342
  • Add #[darling(derive_syn_parse)] to also impl syn::parse::Parse when deriving FromMeta #285
  • Make impl FromMeta for syn::TypePath support both quote-wrapped and bare values #351
  • Add util::PreservedStrExpr #346
  • Impl UsesTypeParams and UsesLifetimes for WithOriginal #215
  • Update error message emitted by <() as FromMeta>::from_list to allow use of () as a #[darling(flatten)] target #353

v0.20.11

28 Mar 20:05

Choose a tag to compare

  • Support #[darling(with = ...)] on the data field when deriving FromDeriveInput. This allows the use of simpler receiver types, such as a Vec of enum variants.
  • Bump version of proc-macro2 to 1.0.86.
  • Accept closures for #[darling(with = ...)] on fields in FromDeriveInput, FromMeta, FromField, etc. #309
  • Add darling::util::Callable to accept a path or closure as a meta-item expression
  • Add #[darling(from_word = ...)] and #[darling(from_none = ...)] to control shorthand and fallback behaviors for structs and enums deriving FromMeta #320
  • Add FromMeta impl for syn::ExprRange #329

v0.20.10

09 Jul 13:47

Choose a tag to compare

  • Add #[allow(clippy::manual_unwrap_or_default)] to all generated impls to avoid causing clippy fails in crates using darling #296
  • Properly initialize attrs magic field in derived FromAttributes impls #297

v0.20.8

23 Feb 21:57

Choose a tag to compare

  • Add #[darling(with = ...)] support to attrs magic field to allow using custom receiver types for attrs #273

v0.20.7

22 Feb 22:12

Choose a tag to compare

  • Add #[darling(flatten)] to allow forwarding unknown fields to another struct #146
  • Don't suggest names of skipped fields in derived impls #268