Run cargo fmt
Run the formatter and commit only the changes to `owned`, no other changes.
This commit is contained in:
parent
3fdc574851
commit
ae0a5bd64a
|
@ -91,7 +91,7 @@ impl ScriptBuf {
|
||||||
|
|
||||||
mod tmp_pub {
|
mod tmp_pub {
|
||||||
use super::*;
|
use super::*;
|
||||||
impl ScriptBuf {
|
impl ScriptBuf {
|
||||||
/// Creates a new script builder
|
/// Creates a new script builder
|
||||||
pub fn builder() -> Builder { Builder::new() }
|
pub fn builder() -> Builder { Builder::new() }
|
||||||
|
|
||||||
|
@ -152,12 +152,12 @@ impl ScriptBuf {
|
||||||
/// `Builder` if you're creating the script from scratch or if you want to push `OP_VERIFY`
|
/// `Builder` if you're creating the script from scratch or if you want to push `OP_VERIFY`
|
||||||
/// multiple times.
|
/// multiple times.
|
||||||
pub fn scan_and_push_verify(&mut self) { self.push_verify(self.last_opcode()); }
|
pub fn scan_and_push_verify(&mut self) { self.push_verify(self.last_opcode()); }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
mod tmp_priv {
|
mod tmp_priv {
|
||||||
use super::*;
|
use super::*;
|
||||||
impl ScriptBuf {
|
impl ScriptBuf {
|
||||||
/// Pretends to convert `&mut ScriptBuf` to `&mut Vec<u8>` so that it can be modified.
|
/// Pretends to convert `&mut ScriptBuf` to `&mut Vec<u8>` so that it can be modified.
|
||||||
///
|
///
|
||||||
/// Note: if the returned value leaks the original `ScriptBuf` will become empty.
|
/// Note: if the returned value leaks the original `ScriptBuf` will become empty.
|
||||||
|
@ -220,7 +220,7 @@ impl ScriptBuf {
|
||||||
None => self.push_opcode(OP_VERIFY),
|
None => self.push_opcode(OP_VERIFY),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> core::iter::FromIterator<Instruction<'a>> for ScriptBuf {
|
impl<'a> core::iter::FromIterator<Instruction<'a>> for ScriptBuf {
|
||||||
|
@ -280,15 +280,11 @@ pub(crate) struct ScriptBufAsVec<'a>(&'a mut ScriptBuf, Vec<u8>);
|
||||||
impl<'a> core::ops::Deref for ScriptBufAsVec<'a> {
|
impl<'a> core::ops::Deref for ScriptBufAsVec<'a> {
|
||||||
type Target = Vec<u8>;
|
type Target = Vec<u8>;
|
||||||
|
|
||||||
fn deref(&self) -> &Self::Target {
|
fn deref(&self) -> &Self::Target { &self.1 }
|
||||||
&self.1
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> core::ops::DerefMut for ScriptBufAsVec<'a> {
|
impl<'a> core::ops::DerefMut for ScriptBufAsVec<'a> {
|
||||||
fn deref_mut(&mut self) -> &mut Self::Target {
|
fn deref_mut(&mut self) -> &mut Self::Target { &mut self.1 }
|
||||||
&mut self.1
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Drop for ScriptBufAsVec<'a> {
|
impl<'a> Drop for ScriptBufAsVec<'a> {
|
||||||
|
|
Loading…
Reference in New Issue