-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve CompatibleType not implemented error message #4472
Improve CompatibleType not implemented error message #4472
Conversation
I was told "OK I see this error message but my struct already implements Selectable so that's not useful". As it turns out, this message would sometimes be misunderstood as the `check_for_backend` part only relating to the `QueryableByName` usage, but not to the `Selectable` usage, whereas that is in fact the key point. Hopefully this new writing will avoid this. :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good for me beside the missing ` to indicate that this is rust code. It just looks strange to use them only partially.
That written: Ideally I would find the time to implement the other part of the on_unimplemented
attribute, which would allow us to add conditions to that attribute to only apply in certain situations. That would enable us to only talk about Selectable
or QueryableByName
if they are relevant. Maybe someday…
Co-authored-by: Georg Semmler <[email protected]>
8d895fe
to
0813d76
Compare
This commit prepares a 2.2.8 release that includes the following changes: * diesel-rs#4472 * diesel-rs#4484 * diesel-rs#4486 * diesel-rs#4480
This commit prepares a 2.2.8 release that includes the following changes: * diesel-rs#4472 * diesel-rs#4484 * diesel-rs#4486 * diesel-rs#4480
I was told "OK I see this error message but my struct already implements Selectable so that's not useful".
As it turns out, this message would sometimes be misunderstood as the
check_for_backend
part only relating to theQueryableByName
usage, but not to theSelectable
usage, whereascheck_for_backend
is in fact the key point.Hopefully this new writing will avoid this. :)