chore: rearrange impl order (#1796)

This commit is contained in:
Matthias Seitz
2023-03-16 15:22:08 +01:00
committed by GitHub
parent 498687b761
commit 9f00d48402
6 changed files with 57 additions and 57 deletions

View File

@ -259,22 +259,6 @@ pub struct NewPooledTransactionHashes68 {
}
impl Encodable for NewPooledTransactionHashes68 {
fn length(&self) -> usize {
#[derive(RlpEncodable)]
struct EncodableNewPooledTransactionHashes68<'a> {
types: &'a [u8],
sizes: &'a Vec<usize>,
hashes: &'a Vec<H256>,
}
let encodable = EncodableNewPooledTransactionHashes68 {
types: &self.types[..],
sizes: &self.sizes,
hashes: &self.hashes,
};
encodable.length()
}
fn encode(&self, out: &mut dyn bytes::BufMut) {
#[derive(RlpEncodable)]
struct EncodableNewPooledTransactionHashes68<'a> {
@ -291,6 +275,22 @@ impl Encodable for NewPooledTransactionHashes68 {
encodable.encode(out);
}
fn length(&self) -> usize {
#[derive(RlpEncodable)]
struct EncodableNewPooledTransactionHashes68<'a> {
types: &'a [u8],
sizes: &'a Vec<usize>,
hashes: &'a Vec<H256>,
}
let encodable = EncodableNewPooledTransactionHashes68 {
types: &self.types[..],
sizes: &self.sizes,
hashes: &self.hashes,
};
encodable.length()
}
}
impl Decodable for NewPooledTransactionHashes68 {