Closed justinfx closed 4 years ago
Let me know if you run into any more issues like this. There were a couple places where I was assuming none-pointers.
Thanks for reporting the issue.
Very cool. Thanks for this fix! I will submit any other issues that I discover.
When implementing a custom
Storer
on a type, I have found that during an Upsert, if the value already exists, the reflection logic ends up passing an**Item
instead of*Item
to the index function. This inconsistent type seems to be handled fine in theanonStorer
reflection logic, but breaks a custom index function that expects to always get the same type. I'm currently working around this by type checking thevalue
in each index function for**Item
and dereferencing it once as needed to cope with the delete.Here is a simple reproduction of the panic. Am I doing something wrong here?
Originally mentioned in #64