zxcvbn-rs icon indicating copy to clipboard operation
zxcvbn-rs copied to clipboard

Add a `de` feature to complement `ser`

Open BrandonDyer64 opened this issue 1 year ago • 1 comments

I can serialize the Entropy struct, but have no way to deserialize it without making my own struct.

I propose adding

#[cfg_attr(feature = "de", derive(Deserialize))]

BrandonDyer64 avatar Nov 19 '23 20:11 BrandonDyer64

It probably makes sense to just bake it into the existing ser feature. The reason the feature would be desired is to avoid depending on serde if not needed. If we enable the feature we may as well use it for both Serialize and Deserialize.

shssoichiro avatar Nov 22 '23 08:11 shssoichiro