Derive Copy for WitnessProgram

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

Fix: #2313
This commit is contained in:
Tobin C. Harding 2024-01-08 13:51:12 +11:00
parent d5c7061ae4
commit b02c7d1d33
No known key found for this signature in database
GPG Key ID: 40BF9E4C269D6607
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,