Fix clippy pedantic and nursery lints as well

This commit is contained in:
junderw
2023-06-25 16:08:16 -07:00
committed by Mononaut
parent e61ae59e53
commit 609df31e0c
6 changed files with 101 additions and 49 deletions

View File

@@ -12,8 +12,8 @@ pub struct ThreadTransaction {
}
impl ThreadTransaction {
pub fn batch_from_buffer(buffer: &[u8]) -> Vec<ThreadTransaction> {
let mut transactions: Vec<ThreadTransaction> = Vec::new();
pub fn batch_from_buffer(buffer: &[u8]) -> Vec<Self> {
let mut transactions: Vec<Self> = Vec::new();
let mut cursor = Cursor::new(buffer);
let size = cursor.get_u32();
for _ in 0..size {
@@ -28,7 +28,7 @@ impl ThreadTransaction {
for _ in 0..input_count {
inputs.push(cursor.get_u32());
}
transactions.push(ThreadTransaction {
transactions.push(Self {
uid,
fee,
weight,