mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
chore: include path in panic (#12407)
This commit is contained in:
@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user