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:
Tobin C. Harding 2023-02-14 10:37:56 +11:00
parent 5fed454949
commit a819cf99d6
No known key found for this signature in database
GPG Key ID: 40BF9E4C269D6607
1 changed files with 0 additions and 9 deletions

View File

@ -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 {