summaryrefslogtreecommitdiff
path: root/plugins/warp/benches/convert.rs
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/warp/benches/convert.rs')
-rw-r--r--plugins/warp/benches/convert.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/plugins/warp/benches/convert.rs b/plugins/warp/benches/convert.rs
index 15065d8f..7d7f40b3 100644
--- a/plugins/warp/benches/convert.rs
+++ b/plugins/warp/benches/convert.rs
@@ -1,12 +1,11 @@
-use binaryninja::binaryview::BinaryViewExt;
+use binaryninja::binary_view::BinaryViewExt;
use binaryninja::headless::Session;
-use binaryninja::types::Conf;
use criterion::{criterion_group, criterion_main, Criterion};
use std::path::PathBuf;
use warp_ninja::convert::from_bn_type;
pub fn type_conversion_benchmark(c: &mut Criterion) {
- let session = Session::new();
+ let session = Session::new().expect("Failed to initialize session");
let out_dir = env!("OUT_DIR").parse::<PathBuf>().unwrap();
for entry in std::fs::read_dir(out_dir).expect("Failed to read OUT_DIR") {
let entry = entry.expect("Failed to read directory entry");
@@ -26,7 +25,7 @@ pub fn type_conversion_benchmark(c: &mut Criterion) {
c.bench_function("type conversion all types", |b| {
b.iter(|| {
for ty in &types {
- from_bn_type(&bv, &ty.type_object(), u8::MAX);
+ from_bn_type(&bv, &ty.ty, u8::MAX);
}
})
});