Skip to content
This repository has been archived by the owner on Jan 10, 2025. It is now read-only.

Commit

Permalink
Fixes warnings on nightly
Browse files Browse the repository at this point in the history
  • Loading branch information
Lichtso committed Apr 13, 2021
1 parent b03bbe5 commit cf876c7
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions benches/vm_execution.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,12 @@ fn bench_init_interpreter_execution(bencher: &mut Bencher) {
let mut file = File::open("tests/elfs/pass_stack_reference.so").unwrap();
let mut elf = Vec::new();
file.read_to_end(&mut elf).unwrap();
let executable =
Executable::<UserError, DefaultInstructionMeter>::from_elf(&elf, None, Config::default())
.unwrap();
let executable = <dyn Executable<UserError, DefaultInstructionMeter>>::from_elf(
&elf,
None,
Config::default(),
)
.unwrap();
let mut vm =
EbpfVm::<UserError, DefaultInstructionMeter>::new(executable.as_ref(), &mut [], &[])
.unwrap();
Expand All @@ -41,9 +44,12 @@ fn bench_init_jit_execution(bencher: &mut Bencher) {
let mut file = File::open("tests/elfs/pass_stack_reference.so").unwrap();
let mut elf = Vec::new();
file.read_to_end(&mut elf).unwrap();
let mut executable =
Executable::<UserError, DefaultInstructionMeter>::from_elf(&elf, None, Config::default())
.unwrap();
let mut executable = <dyn Executable<UserError, DefaultInstructionMeter>>::from_elf(
&elf,
None,
Config::default(),
)
.unwrap();
executable.jit_compile().unwrap();
let mut vm =
EbpfVm::<UserError, DefaultInstructionMeter>::new(executable.as_ref(), &mut [], &[])
Expand All @@ -61,7 +67,7 @@ fn bench_jit_vs_interpreter(
mem: &mut [u8],
) {
let program = assemble(assembly).unwrap();
let mut executable = Executable::<UserError, TestInstructionMeter>::from_text_bytes(
let mut executable = <dyn Executable<UserError, TestInstructionMeter>>::from_text_bytes(
&program,
None,
Config::default(),
Expand Down

0 comments on commit cf876c7

Please sign in to comment.