From f46a4d29f4302df451ebde2d06e3e721f663424d Mon Sep 17 00:00:00 2001 From: "Tobin C. Harding" Date: Thu, 1 Feb 2024 11:09:36 +1100 Subject: [PATCH] Accept slice instead of vec --- src/v0/miniscript/satisfy.rs | 2 +- src/v2/miniscript/satisfy.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/v0/miniscript/satisfy.rs b/src/v0/miniscript/satisfy.rs index faf686e..a7a76bb 100644 --- a/src/v0/miniscript/satisfy.rs +++ b/src/v0/miniscript/satisfy.rs @@ -137,7 +137,7 @@ impl<'a, Pk: MiniscriptKey + ToPublicKey> Satisfier for PsbtInputSatisfier<' } } -fn try_vec_as_preimage32(vec: &Vec) -> Option { +fn try_vec_as_preimage32(vec: &[u8]>) -> Option { if vec.len() == 32 { let mut arr = [0u8; 32]; arr.copy_from_slice(vec); diff --git a/src/v2/miniscript/satisfy.rs b/src/v2/miniscript/satisfy.rs index 5e1394b..ebd709b 100644 --- a/src/v2/miniscript/satisfy.rs +++ b/src/v2/miniscript/satisfy.rs @@ -125,7 +125,7 @@ impl<'a, Pk: MiniscriptKey + ToPublicKey> Satisfier for InputSatisfier<'a> { } } -fn try_vec_as_preimage32(vec: &Vec) -> Option { +fn try_vec_as_preimage32(vec: &[u8]>) -> Option { if vec.len() == 32 { let mut arr = [0u8; 32]; arr.copy_from_slice(vec);