diff --git a/Cargo.toml b/Cargo.toml index 92101a1..81cf8c8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,6 @@ [workspace] members = ["canbench-bin", "canbench-rs", "canbench-rs-macros"] +resolver = "2" [workspace.dependencies] candid = "0.9.11" diff --git a/canbench-bin/src/lib.rs b/canbench-bin/src/lib.rs index bc9d049..d0295e1 100644 --- a/canbench-bin/src/lib.rs +++ b/canbench-bin/src/lib.rs @@ -77,7 +77,7 @@ pub fn run_benchmarks( println!("---------------------------------------------------"); println!(); - let result = run_benchmark(canister_wasm_path, &bench_fn); + let result = run_benchmark(canister_wasm_path, bench_fn); // Compare result to previous result if that exists. if let Some(current_result) = current_results.get(&bench_fn.to_string()) { @@ -214,7 +214,7 @@ query rwlgt-iiaaa-aaaaa-aaaaa-cai {}{} \"DIDL\x00\x00\"", // Decode the response. Decode!( - &hex::decode(&result_hex[2..]).expect(&format!( + &hex::decode(&result_hex[2..]).unwrap_or_else(|_| panic!( "error parsing result of benchmark {}. Result: {}", bench_fn, result_hex )),