iliekturtles / uom

Units of measurement -- type-safe zero-cost dimensional analysis
Apache License 2.0
1.01k stars 92 forks source link

Add explicit serde feature #436

Closed Aehmlo closed 1 year ago

Aehmlo commented 1 year ago

This revision adds an explicit Cargo feature named serde. This feature is almost identical to the old use_serde feature, but uses features of Cargo's new feature resolver to automatically enable serde features for num-* crates as appropriate. The use_serde feature is now a (deprecated) alias for this new serde feature.

Very few changes were required, since uom was already using the (then-implicit) serde feature to begin with. I was unable to find an elegant way to warn users specifying use_serde to switch to the new feature.

This closes #216.

Aehmlo commented 1 year ago

Added comments to Cargo.toml and README.md and squashed into the prior commit.

iliekturtles commented 1 year ago

Merged! Thanks again for the PR.