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
Hi,
I'm trying to implement Debug or Format for enums (yes, I know about the derive) and
don't want to hardcode enum tag names as strings.
Potentially, enum tags can change names in future and I want to be sure that print-ed values will follow names.
Was thinking about using nameof for this. For instance:
Hi,
I'm trying to implement Debug or Format for enums (yes, I know about the derive) and
don't want to hardcode enum tag names as strings.
Potentially, enum tags can change names in future and I want to be sure that print-ed values will follow names.
Was thinking about using
nameof
for this. For instance:The text was updated successfully, but these errors were encountered: