Merge rust-bitcoin/rust-bitcoin#1646: Remove FromStr impl from ScriptBuf
a819cf99d6
Remove FromStr impl from ScriptBuf (Tobin C. Harding) Pull request description: `FromStr` impls should roundtrip with `Display` imlps but currently our `ScriptBuf` displays using instructions but parses hex. Looks like this slipped back in during a recent rebase fail by me. ACKs for top commit: apoelstra: ACKa819cf99d6
Kixunil: ACKa819cf99d6
Tree-SHA512: 754f87147a1cffccea8b4016a4fe204b34e85a983dd89e4c3c2a73c694420f87fda6bea5b7a298a84e95a0e9b6942841fb5cdef0c12662b64819c79cfe5d96f9
This commit is contained in:
commit
0a83f1279b
|
@ -62,7 +62,6 @@ use serde;
|
|||
use crate::blockdata::opcodes::{self, all::*};
|
||||
use crate::consensus::{encode, Decodable, Encodable};
|
||||
use crate::hash_types::{ScriptHash, WScriptHash};
|
||||
use crate::hashes::hex;
|
||||
use crate::{io, OutPoint};
|
||||
use crate::prelude::*;
|
||||
|
||||
|
@ -344,14 +343,6 @@ impl From<&Script> for WScriptHash {
|
|||
}
|
||||
}
|
||||
|
||||
impl core::str::FromStr for ScriptBuf {
|
||||
type Err = hex::Error;
|
||||
#[inline]
|
||||
fn from_str(s: &str) -> Result<Self, hex::Error> {
|
||||
ScriptBuf::from_hex(s)
|
||||
}
|
||||
}
|
||||
|
||||
impl AsRef<Script> for Script {
|
||||
#[inline]
|
||||
fn as_ref(&self) -> &Script {
|
||||
|
|
Loading…
Reference in New Issue