Closed IniterWorker closed 1 year ago
I made some changes to meet your clippy requirements. The remaining errors are coming from the current source code on the master.
Hi @sharksforarms,
Do you wait for any improvement on my side ?
Hi sorry, life has been busy.
The change looks good to me, thanks for adding tests. I'm not sure of the name catch_all
, I would prefer something like default
, wdyt? cc @wcampbell0x2a
Hi sorry, life has been busy.
The change looks good to me, thanks for adding tests. I'm not sure of the name
catch_all
, I would prefer something likedefault
, wdyt? cc @wcampbell0x2a
Sure! I think it more closely follows https://doc.rust-lang.org/std/default/trait.Default.html#enums (we could parse that in the future, or not idk).
Introducing the new
default
feature in the derive crate forDekuRead
!New feature that allows developers to catch every value from a variant without reporting any
DekuError
. This is particularly useful in cases where unpredictable data may exist in an enum/protocol.With the
default
feature, you no longer need to worry about handling each possible value explicitly. Instead, you can catch all values with a single line of code. This simplifies the development process and saves valuable time.I've taken care to thoroughly test this feature, with tests covering compilation and end-to-end integration.
@sharksforarms, I value your input and would love to hear your thoughts on this new feature. Please don't hesitate to reach out with any feedback or suggestions for future improvements.
Will close https://github.com/sharksforarms/deku/issues/328