Run the formatter
Run `cargo +nightly fmt`, no manual changes. Done separately to make review of the last patch easier.
This commit is contained in:
parent
3ca55fb163
commit
b503aa1544
|
@ -363,10 +363,7 @@ macro_rules! impl_int_encodable {
|
||||||
}
|
}
|
||||||
impl Encodable for $ty {
|
impl Encodable for $ty {
|
||||||
#[inline]
|
#[inline]
|
||||||
fn consensus_encode<W: Write + ?Sized>(
|
fn consensus_encode<W: Write + ?Sized>(&self, w: &mut W) -> Result<usize, io::Error> {
|
||||||
&self,
|
|
||||||
w: &mut W,
|
|
||||||
) -> Result<usize, io::Error> {
|
|
||||||
w.$meth_enc(*self)?;
|
w.$meth_enc(*self)?;
|
||||||
Ok(mem::size_of::<$ty>())
|
Ok(mem::size_of::<$ty>())
|
||||||
}
|
}
|
||||||
|
@ -586,10 +583,7 @@ macro_rules! impl_vec {
|
||||||
($type: ty) => {
|
($type: ty) => {
|
||||||
impl Encodable for Vec<$type> {
|
impl Encodable for Vec<$type> {
|
||||||
#[inline]
|
#[inline]
|
||||||
fn consensus_encode<W: Write + ?Sized>(
|
fn consensus_encode<W: Write + ?Sized>(&self, w: &mut W) -> Result<usize, io::Error> {
|
||||||
&self,
|
|
||||||
w: &mut W,
|
|
||||||
) -> Result<usize, io::Error> {
|
|
||||||
let mut len = 0;
|
let mut len = 0;
|
||||||
len += VarInt(self.len() as u64).consensus_encode(w)?;
|
len += VarInt(self.len() as u64).consensus_encode(w)?;
|
||||||
for c in self.iter() {
|
for c in self.iter() {
|
||||||
|
|
|
@ -12,10 +12,10 @@
|
||||||
use core::fmt;
|
use core::fmt;
|
||||||
use core::marker::PhantomData;
|
use core::marker::PhantomData;
|
||||||
|
|
||||||
|
use io::{Read, Write};
|
||||||
use serde::de::{SeqAccess, Unexpected, Visitor};
|
use serde::de::{SeqAccess, Unexpected, Visitor};
|
||||||
use serde::ser::SerializeSeq;
|
use serde::ser::SerializeSeq;
|
||||||
use serde::{Deserializer, Serializer};
|
use serde::{Deserializer, Serializer};
|
||||||
use io::{Read, Write};
|
|
||||||
|
|
||||||
use super::encode::Error as ConsensusError;
|
use super::encode::Error as ConsensusError;
|
||||||
use super::{Decodable, Encodable};
|
use super::{Decodable, Encodable};
|
||||||
|
|
|
@ -11,8 +11,8 @@ use core::str::FromStr;
|
||||||
|
|
||||||
use hashes::{hash160, Hash};
|
use hashes::{hash160, Hash};
|
||||||
use hex::FromHex;
|
use hex::FromHex;
|
||||||
use io::{Read, Write};
|
|
||||||
use internals::write_err;
|
use internals::write_err;
|
||||||
|
use io::{Read, Write};
|
||||||
|
|
||||||
use crate::crypto::ecdsa;
|
use crate::crypto::ecdsa;
|
||||||
use crate::internal_macros::impl_asref_push_bytes;
|
use crate::internal_macros::impl_asref_push_bytes;
|
||||||
|
|
Loading…
Reference in New Issue