Skip to content

Commit

Permalink
chore: include path in panic (#12407)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattsse authored Nov 8, 2024
1 parent 74d7fe3 commit 86230d9
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions crates/storage/db/benches/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,11 @@ where
T::Key: Default + Clone + for<'de> serde::Deserialize<'de>,
T::Value: Default + Clone + for<'de> serde::Deserialize<'de>,
{
let path =
format!("{}/../../../testdata/micro/db/{}.json", env!("CARGO_MANIFEST_DIR"), T::NAME);
let list: Vec<TableRow<T>> = serde_json::from_reader(std::io::BufReader::new(
std::fs::File::open(format!(
"{}/../../../testdata/micro/db/{}.json",
env!("CARGO_MANIFEST_DIR"),
T::NAME
))
.expect("Test vectors not found. They can be generated from the workspace by calling `cargo run --bin reth --features dev -- test-vectors tables`."),
std::fs::File::open(&path)
.unwrap_or_else(|_| panic!("Test vectors not found. They can be generated from the workspace by calling `cargo run --bin reth --features dev -- test-vectors tables`: {:?}", path))
))
.unwrap();

Expand Down

0 comments on commit 86230d9

Please sign in to comment.