Skip to content

Commit

Permalink
fix clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
mattstam committed May 30, 2024
1 parent 5b88ca8 commit 790e97f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions core/src/runtime/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ impl Display for ExecutionReport {

// Sort instructions by opcode name
sorted_instructions.sort_by_key(|&(opcode, _)| opcode.to_string());
for (opcode, count) in sorted_instructions {
for (opcode, count) in &sorted_instructions {
writeln!(f, " {}: {}", opcode, count)?;
}
writeln!(f, "Total Instructions: {}", self.total_instruction_count())?;
Expand All @@ -122,9 +122,9 @@ impl Display for ExecutionReport {
let mut sorted_syscalls = self.syscall_counts.iter().collect::<Vec<_>>();

// Sort syscalls by syscall name
sorted_syscalls.sort_by_key(|&(syscall, _)| format!("{:?}", syscall));
for (syscall, count) in sorted_syscalls {
writeln!(f, " {}: {}", format!("{:?}", syscall), count)?;
sorted_syscalls.sort_by_key(|&(syscall, _)| syscall.to_string());

Check failure on line 125 in core/src/runtime/mod.rs

View workflow job for this annotation

GitHub Actions / Test (x86-64)

the method `to_string` exists for reference `&SyscallCode`, but its trait bounds were not satisfied

Check failure on line 125 in core/src/runtime/mod.rs

View workflow job for this annotation

GitHub Actions / Formatting & Clippy

the method `to_string` exists for reference `&SyscallCode`, but its trait bounds were not satisfied

Check failure on line 125 in core/src/runtime/mod.rs

View workflow job for this annotation

GitHub Actions / Test (ARM)

the method `to_string` exists for reference `&SyscallCode`, but its trait bounds were not satisfied
for (syscall, count) in &sorted_syscalls {
writeln!(f, " {}: {}", syscall, count)?;

Check failure on line 127 in core/src/runtime/mod.rs

View workflow job for this annotation

GitHub Actions / Test (x86-64)

`runtime::syscall::SyscallCode` doesn't implement `std::fmt::Display`

Check failure on line 127 in core/src/runtime/mod.rs

View workflow job for this annotation

GitHub Actions / Formatting & Clippy

`runtime::syscall::SyscallCode` doesn't implement `std::fmt::Display`

Check failure on line 127 in core/src/runtime/mod.rs

View workflow job for this annotation

GitHub Actions / Test (ARM)

`runtime::syscall::SyscallCode` doesn't implement `std::fmt::Display`
}
writeln!(f, "Total Syscall Count: {}", self.total_syscall_count())?;

Expand Down

0 comments on commit 790e97f

Please sign in to comment.