From 6ccd157775eacee05f3519d600b520620242d5fd Mon Sep 17 00:00:00 2001 From: Andrew Poelstra Date: Thu, 2 Jun 2016 23:47:29 +0000 Subject: [PATCH] Add `into_vec` method to Script --- Cargo.toml | 2 +- src/blockdata/script.rs | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index b219d0ce..968cd4f2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "bitcoin" -version = "0.5.9" +version = "0.5.10" authors = ["Andrew Poelstra "] license = "CC0-1.0" homepage = "https://github.com/apoelstra/rust-bitcoin/" diff --git a/src/blockdata/script.rs b/src/blockdata/script.rs index a3c33ce7..5a1f4f63 100644 --- a/src/blockdata/script.rs +++ b/src/blockdata/script.rs @@ -1874,6 +1874,9 @@ impl Script { /// Whether the script is the empty script pub fn is_empty(&self) -> bool { self.0.is_empty() } + /// Convert the script into a byte vector + pub fn into_vec(self) -> Vec { self.0.into_vec() } + /// Trace a script pub fn trace<'a>(&'a self, secp: &Secp256k1, stack: &mut Vec>, input_context: Option<(&Transaction, usize)>)