Skip to content

address: Only derive Copy if a crate feature is enabled #342

@joncinque

Description

@joncinque

Problem

The Address type derives Copy by default, which is very useful in a lot of cases. For example, bytemuck's Pod trait requires all types within to implement Copy.

However, the Copy trait makes it easy to create many more copies than expected, making on-chain programs less efficient.

Proposed Solution

Only derive the Copy trait if a feature is enabled on solana-address.

cc @febo

Metadata

Metadata

Assignees

No one assigned

    Labels

    breakingPR contains breaking changes

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions