Closed hwmaier closed 1 year ago
Alternatively to adding #[cfg(feature = "num-traits/i128")]
it may be better to add the i128
feature to the num_traits
package in Cargo.toml
:
num-traits = { version = "^0.2", features = ["i128"] }
Thanks for the PR.
I prefer to add "#[cfg(feature = "num-traits/i128")]".
I will release it as soon as possible after you fix it!
I prefer to add "#[cfg(feature = "num-traits/i128")]".
I will release it as soon as possible after you fix it!
Hi @yassun4dev, I reverted my last commit to use your preferred #[cfg(feature = "num-traits/i128")]
solution.
@hwmaier I released v0.15.0.
I found that some of my applications that use i128 fail to compile, so I ended up adding the i128
feature.
For backward compatibility, the i128 feature is supported by default, and can be used without editing the settings in Cargo.toml.
I found that some of my applications that use i128 fail to compile, so I ended up adding the
i128
feature.
Great. I checked the latest v0.15.0 release today and compiled it for the embedded ESP32 platform and all compiles without error out of the box.
Thank you so much for incorporating these changes.
serde_valid is a very useful add-on for serde deserializations.
This PR contains changes to compile it for embedded platforms which don't autodetect
std
feature andi128
feature. Specifically the ESP32 platform.To compile there,
indexmap
needs featurestd
enabled. In additionnum_traits
won't have the traits fori128
enabled, so this PR makes thenumeric_multiple_of
validations for 128-bit integers only available if thei128
feature is enabled and avoids a compilation error if not.