Closed lnicola closed 5 years ago
Yea thats a good idea. I will try to make a fix.
The problem is that the variant is public, so changing its type would technically be a breaking change. Maybe you can replace HidDeviceInfo
with a boxed value, but..
I just updated it to 1.0.1, I hope no one upgraded to 1.0.0 already.
Edit: To be honest, I did not realize, that Rust implies that enum variant members are public. Makes sense because of the pattern matching... Never crossed my mind before.
I upgraded, but don't worry :smile:. You can yank it, I suppose, but maybe nobody is looking at the fields in the error variants. It's very easy to break semver compat this way, though.
I`ll yank 1.0.0 :P
The 1.0 ship has sailed now (:tada:), but
HidError
is somewhat on the large side because of itsHidDeviceInfo
variant: 112 bytes on x64. Unfortunately, the compiler isn't too good at avoiding implicit copies (made for moves), so it's worth boxing it.