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::blockdata::opcodes::{self, all::*};
|
||||||
use crate::consensus::{encode, Decodable, Encodable};
|
use crate::consensus::{encode, Decodable, Encodable};
|
||||||
use crate::hash_types::{ScriptHash, WScriptHash};
|
use crate::hash_types::{ScriptHash, WScriptHash};
|
||||||
use crate::hashes::hex;
|
|
||||||
use crate::{io, OutPoint};
|
use crate::{io, OutPoint};
|
||||||
use crate::prelude::*;
|
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 {
|
impl AsRef<Script> for Script {
|
||||||
#[inline]
|
#[inline]
|
||||||
fn as_ref(&self) -> &Script {
|
fn as_ref(&self) -> &Script {
|
||||||
|
|
Loading…
Reference in New Issue