- Notifications
You must be signed in to change notification settings - Fork301
style/color: derive serialize & deserialize#659
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
style/color: derive serialize & deserialize#659
Uh oh!
There was an error while loading.Please reload this page.
Conversation
3df125c
to030a21a
CompareThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I totally understand the intend of the PR and I agree that this is useful. However, some might want to use plotters without pulling in serde as dependency. Therefore, this feature should be added behind a feature flag IMO.
030a21a
to5eb2238
CompareUsing serde is useful in production, not just during development,so move it to optional dependencies instead of dev-dependencies.This allows to derive serialize/deserialize for the color structswhich are very simple using the default implementation, allowingto pass colors along via serialization channels and formats.
5eb2238
to7f96558
CompareHello@AaronErhardt and thank you for your patience! I've updated the PR to make serde an optional dependency while still keeping it enabled in dev-dependencies and added a small documentation blurb for the new |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Thanks, looks good!
3ad52da
intoplotters-rs:masterUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Using serde is useful in production, not just during development, so move it to optional dependencies instead of dev-dependencies.
This allows to derive serialize/deserialize for the color structs which are very simple using the default implementation, allowing to pass colors along via serialization channels and formats.