Skip to content

Commit adf3099

Browse files
authored
chore: make clippy happy (#6518)
1 parent 3ee4135 commit adf3099

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

crates/debugger/src/tui/draw.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -759,7 +759,7 @@ Line::from(Span::styled("[t]: stack labels | [m]: memory decoding | [shift + j/k
759759
/// (read memory offset, read memory size, write memory offset, write memory size)
760760
fn get_memory_access(
761761
op: u8,
762-
stack: &Vec<U256>,
762+
stack: &[U256],
763763
) -> (Option<usize>, Option<usize>, Option<usize>, Option<usize>) {
764764
let memory_access = match op {
765765
opcode::KECCAK256 | opcode::RETURN | opcode::REVERT => (1, 2, 0, 0),

crates/fmt/src/formatter.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1070,7 +1070,7 @@ impl<'a, W: Write> Formatter<'a, W> {
10701070
fn visit_list<T>(
10711071
&mut self,
10721072
prefix: &str,
1073-
items: &mut Vec<T>,
1073+
items: &mut [T],
10741074
start_offset: Option<usize>,
10751075
end_offset: Option<usize>,
10761076
paren_required: bool,
@@ -1113,7 +1113,7 @@ impl<'a, W: Write> Formatter<'a, W> {
11131113
fn visit_block<T>(
11141114
&mut self,
11151115
loc: Loc,
1116-
statements: &mut Vec<T>,
1116+
statements: &mut [T],
11171117
attempt_single_line: bool,
11181118
attempt_omit_braces: bool,
11191119
) -> Result<bool>
@@ -1167,7 +1167,7 @@ impl<'a, W: Write> Formatter<'a, W> {
11671167
Statement::Block { loc, statements, .. } => {
11681168
self.visit_block(*loc, statements, attempt_single_line, true)
11691169
}
1170-
_ => self.visit_block(stmt.loc(), &mut vec![stmt], attempt_single_line, true),
1170+
_ => self.visit_block(stmt.loc(), &mut [stmt], attempt_single_line, true),
11711171
}
11721172
}
11731173

0 commit comments

Comments
 (0)