strum icon indicating copy to clipboard operation
strum copied to clipboard

feat: added discriminator fn

Open DevSlashRichie opened this issue 1 year ago • 1 comments

I've just added a discriminant() function which from the original enum returns it matched discriminant. Is just less verbose.

DevSlashRichie avatar Aug 27 '23 04:08 DevSlashRichie

Hey @DevSlashRichie, thanks for opening a PR here. Just to make sure I'm understanding the intention correctly, the purpose of this PR is to add an inherent method because it's shorter than using the Trait impl?

If so, I appreciate the consideration, but I don't think it's a good fit. As convenient as inherent methods are, they are always in scope so it can cause annoying collisions with other userd-defined methods.

Peternator7 avatar Sep 04 '23 23:09 Peternator7