Remove FromStr impl from ScriptBuf
`FromStr` impls should roundtrip with `Display` imlps but currently our `ScriptBuf` displays using instructions but parses hex.
This commit is contained in:
parent
5fed454949
commit
a819cf99d6
|
@ -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