|  faf003fc9d # Objective The `enum_utility` module contains the `get_variant_constructors` function, which is used to generate token streams for constructing enums. It's used for the `FromReflect::from_reflect` implementation and the `Reflect::try_apply` implementation. Due to the complexity of enums, this function is understandably a little messy and difficult to extend. ## Solution Clean up the `enum_utility` module. Now "clean" is a bit subjective. I believe my solution is "cleaner" in that the logic to generate the tokens are strictly coupled with the intended usage. Because of this, `try_apply` is also no longer strictly coupled with `from_reflect`. This makes it easier to extend with new functionality, which is something I'm doing in a future unrelated PR that I have based off this one. ## Testing There shouldn't be any testing required other than ensuring that the project still builds and that CI passes. | ||
|---|---|---|
| .. | ||
| impls | ||
| container_attributes.rs | ||
| custom_attributes.rs | ||
| derive_data.rs | ||
| documentation.rs | ||
| enum_utility.rs | ||
| field_attributes.rs | ||
| from_reflect.rs | ||
| lib.rs | ||
| reflect_value.rs | ||
| registration.rs | ||
| serialization.rs | ||
| trait_reflection.rs | ||
| type_path.rs | ||
| utility.rs | ||