Skip to content

Conversation

@lvboudre
Copy link

Since an Address is a wrapper type around a Copy type ([u8;32]) it uselessly break older user-code during crates upgrade which didn't required copy in older version of the crate. Moreover the feature-flag copy is not documented in the documentation

Since an Address is a wrapper type around a Copy type ([u8;32]) it uselessly break older user-code during crates upgrade which didn't required `copy` in older version of the crate.
Moreover the feature-flag `copy` is not documented in the documentation
@febo
Copy link
Contributor

febo commented Nov 18, 2025

Since an Address is a wrapper type around a Copy type ([u8;32]) it uselessly break older user-code during crates upgrade which didn't required copy in older version of the crate.

The rationale is to avoid unintentional copies when writing programs, as discussed here. Versions v1.1 and v2.0 are compatible, which should help with upgrades.

Moreover the feature-flag copy is not documented in the documentation

This is a good point – not clear why the documentation does not show the copy feature requirement for the impl Copy. I will have a look at it.

@lvboudre
Copy link
Author

I guess its subjective, since Pubkey is constant size implements Clone, PartialEq, Eq, Hash it makes sense to always implement Copy for such type. I never had issue with unintentional Copy seems a no-issue to me.

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