You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The crate currently uses num-derive to add some num-traits::FromPrimitive implementations to a couple of enumerations. Since this is done via a procmacro it requires sequencing in the compilation pipeline, compiling proc-macro2/syn prior. All cases are simple enumerations such as :
The functionality could also be added with a standard macro in such simple cases, see this example in smoltcp which adds very similar converters for std::convert::{From, To}.
The text was updated successfully, but these errors were encountered:
Yeah it's totally droppable. image used to depend on it, but only because of the tiff code, and I removed it from image when extracting the code into this crate. It's probably worth doing.
One remaining question is one of style. Either go with the Unknown(_) variant from Tag or make the conversion return an Option like it does right now in the FromPrimitive trait.
The crate currently uses
num-derive
to add somenum-traits::FromPrimitive
implementations to a couple of enumerations. Since this is done via a procmacro it requires sequencing in the compilation pipeline, compilingproc-macro2
/syn
prior. All cases are simple enumerations such as :The functionality could also be added with a standard macro in such simple cases, see this example in
smoltcp
which adds very similar converters forstd::convert::{From, To}
.The text was updated successfully, but these errors were encountered: