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:
Tobin C. Harding 2023-12-11 09:03:07 +11:00
parent 3ca55fb163
commit b503aa1544
No known key found for this signature in database
GPG Key ID: 40BF9E4C269D6607
3 changed files with 4 additions and 10 deletions

View File

@ -363,10 +363,7 @@ macro_rules! impl_int_encodable {
}
impl Encodable for $ty {
#[inline]
fn consensus_encode<W: Write + ?Sized>(
&self,
w: &mut W,
) -> Result<usize, io::Error> {
fn consensus_encode<W: Write + ?Sized>(&self, w: &mut W) -> Result<usize, io::Error> {
w.$meth_enc(*self)?;
Ok(mem::size_of::<$ty>())
}
@ -586,10 +583,7 @@ macro_rules! impl_vec {
($type: ty) => {
impl Encodable for Vec<$type> {
#[inline]
fn consensus_encode<W: Write + ?Sized>(
&self,
w: &mut W,
) -> Result<usize, io::Error> {
fn consensus_encode<W: Write + ?Sized>(&self, w: &mut W) -> Result<usize, io::Error> {
let mut len = 0;
len += VarInt(self.len() as u64).consensus_encode(w)?;
for c in self.iter() {

View File

@ -12,10 +12,10 @@
use core::fmt;
use core::marker::PhantomData;
use io::{Read, Write};
use serde::de::{SeqAccess, Unexpected, Visitor};
use serde::ser::SerializeSeq;
use serde::{Deserializer, Serializer};
use io::{Read, Write};
use super::encode::Error as ConsensusError;
use super::{Decodable, Encodable};

View File

@ -11,8 +11,8 @@ use core::str::FromStr;
use hashes::{hash160, Hash};
use hex::FromHex;
use io::{Read, Write};
use internals::write_err;
use io::{Read, Write};
use crate::crypto::ecdsa;
use crate::internal_macros::impl_asref_push_bytes;