Closed pickx closed 1 year ago
This is super nice, Single
would be cool to have in rust std. Itertools has something like this too (but yours is better here).
I've just done a quick skim rn and yeah, that's how I would split shared.rs
as well, by introducing new lower modules.
The new example can instead be a test.
bitsize_from_type_token
should be moved to shared
, so we don't depend upwards/circular.
Single
would be cool to have in rust std. Itertools has something like this too (but yours is better here).
right? I find that I have a use for something like this pretty often. the API of Itertools's implementation is a little unfortunate and I gave up on it.
actually scratch that, I was just being stubborn.
The new example can instead be a test.
sure. I used the example as a basis for some basic tests. I also kept a more minimal version of the example because I think it's instructive to show the difference between the two forms of #[fallback]
.
merging tomorrow
Fixes #43.
shared.rs
was getting a bit cluttered so I split it intoutil.rs
,fallback.rs
andvariant_value_assigner.rs
. Is that okay? Would you like me to make a separate PR first, containing just the restructuring?As usual, any style/implementation suggestions are welcome. Feel free to correct anything that looks weird.