Skip to content

Commit 33e848e

Browse files
committed
Fix benches
1 parent 19b5b08 commit 33e848e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

benches/execution.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ pub fn criterion_benchmark(c: &mut Criterion) {
116116
.map(|entry| {
117117
let path = entry.unwrap().path();
118118
(
119-
path.file_name().unwrap().to_owned().unwrap().to_owned(),
119+
path.file_name().unwrap().to_str().unwrap().to_owned(),
120120
std::fs::read_to_string(path).unwrap(),
121121
)
122122
})

benches/microbenchmarks.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use criterion::{
33
Criterion, Throughput,
44
};
55
use rustpython_compiler::Mode;
6-
use rustpython_vm::{common::ascii, AsObject, Interpreter, PyResult, Settings};
6+
use rustpython_vm::{AsObject, Interpreter, PyResult, Settings};
77
use std::{
88
ffi, fs, io,
99
path::{Path, PathBuf},
@@ -138,7 +138,7 @@ fn bench_rustpy_code(group: &mut BenchmarkGroup<WallTime>, bench: &MicroBenchmar
138138
scope
139139
.locals
140140
.as_object()
141-
.set_item(vm.new_pyobj(ascii!("ITERATIONS")), vm.new_pyobj(idx), vm)
141+
.set_item("ITERATIONS", vm.new_pyobj(idx), vm)
142142
.expect("Error adding ITERATIONS local variable");
143143
}
144144
let setup_result = vm.run_code_obj(setup_code.clone(), scope.clone());

0 commit comments

Comments
 (0)