-
Notifications
You must be signed in to change notification settings - Fork 98
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot (de-)serialize rational64 with serde #269
Comments
You should be able to work around this by manually enabling the feature by adding num-rational = { version = "*", features = ["serde"] } to your I suspect |
While I opened #270 I see now that forwarding a feature to an optional dependency will also enable the dependency itself. (The so-called "Weak Dependency Feature" Cargo feature is still unstable.) I therefore wonder whether this should be considered a usability issue and the documentation in the README be extended instead of the above? |
I'm leaning towards the second solution so that enabling |
@iliekturtles Friendly ping about considering the README paragraph from #272 for merging. Even if another solution like weak dependency features is chosen eventually, documenting this probably won't hurt until then. |
Hello,
I am trying to (de-)serialize a
uom::si::rational64::Frequency
with serde but I cannot get it working.Cargo.toml
lib.rs
Error:
As far as I can see from the Cargo.lock file, the
serde
feature ofnum-rational
is not activated.The text was updated successfully, but these errors were encountered: