It is a feature in Rust, not a bug :-) (I know you didn't say it is a bug.)
The error-tagged union is PgResult<bool> - which means it contains bool as the result if things go well. (The other part in the union is of course the error.)
In the original function also, it is returning a boolean: "bool has_subclass".
So anyway you have to check for the boolean as part of the logic. That is what it is doing.
The part about veering constantly to navigate the maze of internal politics is fascinating. The compromises he had to make, like not being able to put in on Github initially. The easy victories, like making TypeScript open source.
The long road to success. The obligatory advice for people writing new programming languages (Hint: Mostly, don't.). His opinion about creating a new language for AI (I agree with his insight, but still think it is possible).
Being a non-Christian and it being Christmas time, I am sharing one verse from the New Testament that is, in my opinion, useful - or at the very least, insightful - to anyone, regardless of religion.
Luke 16:10: He who is faithful in a very little thing is faithful also in much; and he who is unrighteous in a very little thing is unrighteous also in much.
I use version managers for Python, Node, Ruby, and others. But for Java, none. I have all the recent versions of Java on my Linux and Windows devices. I download the zip and extract it to a common directory "Java". Setting the path within IDEs is easy, and is mostly unavoidable (regardless of a version manager). Running standalone programs is not that complicated too.
For whatever it is worth, Dorian Nakamoto (whom Leah Goodman claimed to be "The Face Behind Bitcoin"[1]) stays nearby - within the realm of possibility :)
Related: In IRC channels, ask a question and state that a competing product seems to work better. You will get multiple answers within minutes. Works especially well if it is Linux vs Windows.
The error-tagged union is PgResult<bool> - which means it contains bool as the result if things go well. (The other part in the union is of course the error.)
In the original function also, it is returning a boolean: "bool has_subclass".
So anyway you have to check for the boolean as part of the logic. That is what it is doing.