Merge rust-bitcoin/rust-bitcoin#2321: Derive `Copy` for `WitnessProgram`

b02c7d1d33 Derive Copy for WitnessProgram (Tobin C. Harding)

Pull request description:

  Recently we started using our custom `ArrayVec` for the `program` field of `WitnessProgram`, this means we can now derive `Copy`.

  Fix: #2313

ACKs for top commit:
  apoelstra:
    ACK b02c7d1d33
  sanket1729:
    ACK b02c7d1d33

Tree-SHA512: 5741081d578f7b056c156d046dc3b0817b4b13cf69dcc1dfb8c7f4dbe8a4f9ed6c8802aaaf2b0084dbf3984d3fde807a02dbaa8c3bd29c220b3b32d3cb7c9f38
This commit is contained in:
Andrew Poelstra 2024-01-08 20:32:17 +00:00
commit de9f20a620
No known key found for this signature in database
GPG Key ID: C588D63CE41B97C1
1 changed files with 1 additions and 1 deletions

View File

@ -29,7 +29,7 @@ pub const MAX_SIZE: usize = 40;
/// The segregated witness program is technically only the program bytes _excluding_ the witness /// The segregated witness program is technically only the program bytes _excluding_ the witness
/// version, however we maintain length invariants on the `program` that are governed by the version /// version, however we maintain length invariants on the `program` that are governed by the version
/// number, therefore we carry the version number around along with the program bytes. /// number, therefore we carry the version number around along with the program bytes.
#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)] #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct WitnessProgram { pub struct WitnessProgram {
/// The segwit version associated with this witness program. /// The segwit version associated with this witness program.
version: WitnessVersion, version: WitnessVersion,