Skip to content

Conversation

@danieleades
Copy link
Contributor

the current codegen implements From<&Self> for Self for a number of types. This is non-idiomatic since this doesn't match the intended semantics of the From trait and implicitly clones the object. It's also redundant with the Clone trait, which is the idiomatic and explicit way to turn a reference into an object.

This PR removes this implementation. This is a breaking change for downstream users that are passing references- the caller will now need to explicitly clone

@ahl
Copy link
Collaborator

ahl commented Jan 4, 2026

This breaks assumptions (possibly invalid) in https://github.com/oxidecomputer/oxide.rs

@danieleades
Copy link
Contributor Author

This breaks assumptions (possibly invalid) in https://github.com/oxidecomputer/oxide.rs

hmm. it would be good to assess the impact on oxide before merging this.

i could possibly create a progenitor branch that patches in this typify change, and do the same in oxide

Copy link
Collaborator

@ahl ahl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

@ahl ahl merged commit 3661e26 into oxidecomputer:main Jan 5, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants