From e02e42971656a996a332d4536ad055751cf5c479 Mon Sep 17 00:00:00 2001 From: Enrique Ortiz Date: Mon, 4 Dec 2023 11:37:38 -0400 Subject: [PATCH] chore: make clippy happy --- crates/debugger/src/tui/draw.rs | 2 +- crates/fmt/src/formatter.rs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/crates/debugger/src/tui/draw.rs b/crates/debugger/src/tui/draw.rs index 7a044025d028..307eae05bc86 100644 --- a/crates/debugger/src/tui/draw.rs +++ b/crates/debugger/src/tui/draw.rs @@ -759,7 +759,7 @@ Line::from(Span::styled("[t]: stack labels | [m]: memory decoding | [shift + j/k /// (read memory offset, read memory size, write memory offset, write memory size) fn get_memory_access( op: u8, - stack: &Vec, + stack: &[U256], ) -> (Option, Option, Option, Option) { let memory_access = match op { opcode::KECCAK256 | opcode::RETURN | opcode::REVERT => (1, 2, 0, 0), diff --git a/crates/fmt/src/formatter.rs b/crates/fmt/src/formatter.rs index 2ed579dce59c..650f87e2e4fa 100644 --- a/crates/fmt/src/formatter.rs +++ b/crates/fmt/src/formatter.rs @@ -1070,7 +1070,7 @@ impl<'a, W: Write> Formatter<'a, W> { fn visit_list( &mut self, prefix: &str, - items: &mut Vec, + items: &mut [T], start_offset: Option, end_offset: Option, paren_required: bool, @@ -1113,7 +1113,7 @@ impl<'a, W: Write> Formatter<'a, W> { fn visit_block( &mut self, loc: Loc, - statements: &mut Vec, + statements: &mut [T], attempt_single_line: bool, attempt_omit_braces: bool, ) -> Result @@ -1167,7 +1167,7 @@ impl<'a, W: Write> Formatter<'a, W> { Statement::Block { loc, statements, .. } => { self.visit_block(*loc, statements, attempt_single_line, true) } - _ => self.visit_block(stmt.loc(), &mut vec![stmt], attempt_single_line, true), + _ => self.visit_block(stmt.loc(), &mut [stmt], attempt_single_line, true), } }