-
Notifications
You must be signed in to change notification settings - Fork 8
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
feat(deps): upgrade pyo3 #325
Conversation
Signed-off-by: Luka Peschke <[email protected]>
Signed-off-by: Luka Peschke <[email protected]>
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.
Otherwise looks good
@@ -42,11 +43,32 @@ impl FromPyObject<'_> for IdxOrName { | |||
} | |||
} | |||
|
|||
impl ToPyObject for IdxOrName { |
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.
Can't you do
impl<'py, T> IntoPyObject<'py> for T where T: AsRef<IdxOrName>
to avoid this duplication?
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.
This is unfortunately not possible,as IdxOrName
is not generic over T
, which causes T
to be considered a foreign type 😕
impl<'py, T: AsRef<IdxOrName>> IntoPyObject<'py> for T {
^ type parameter `T` must be used as the type parameter for some local type
note: implementing a foreign trait is only possible if at least one of the types for which it is implemented is local
note: only traits defined in the current crate can be implemented for a type parameter
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.
Ah fk yes. The orphan rule striking again. LGTM then
No description provided.