This repository was archived by the owner on Mar 21, 2025. It is now read-only.
This repository was archived by the owner on Mar 21, 2025. It is now read-only.
User Prisma enums don't derive PartialEq #217
Closed
Description
Comparing enums generated from Prisma enums is currently a bit annoying since you can't compare them directly with ==
, and match
ing them indents your code more.
I feel like they should derive PartialEq
and Eq
.
enum Stuff {
ONE
TWO
THREE
}
if thing == Stuff::One /* binary operation `==` cannot be applied to type `prisma::Thing` */ {
// ...
}
Without it, the workaround is to use match
or convert the values to a string with .to_string()
and compare that.