Repository navigation
panic! at the polymorphism failure - #845
workingjubilee merged 2 commits into
Conversation
|
I'm surprised all our tests pass. Can you update the documentation appropriately so people know they should never call these? I'm not sure exactly which places (on |
b0477d6 to
bd2485f
Compare
|
I added some documentation for In the future it might be worth considering using a macro to generate the |
|
Thank you! Yeah, I think this is good then. |
workingjubilee
left a comment
There was a problem hiding this comment.
It's true that we should basically never be using from_datum for this and should be using from_polymorphic_datum always.
* Always panic! on `Any*::from_datum` * Document `from_datum` panicking on polymorphic types
Always
panic!in thefrom_datumimplementation forAnyElement/AnyArrayinstead of only panicking when debug assertions are enabled.These functions should never be called anyways, so there's no real performance benefit by only panicking in debug mode.