feat(error): add wrappers for std::fs methods to track path for errors (#3367)

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
This commit is contained in:
Thomas Coratger
2023-07-01 13:49:26 +02:00
committed by GitHub
parent e468e15e9c
commit 2126c01a42
14 changed files with 155 additions and 54 deletions

View File

@ -130,7 +130,7 @@ where
b.iter_with_setup(
|| {
// Reset DB
let _ = std::fs::remove_dir_all(bench_db_path);
let _ = fs::remove_dir_all(bench_db_path);
(
input.clone(),
Arc::try_unwrap(create_test_rw_db_with_path(bench_db_path)).unwrap(),
@ -156,7 +156,7 @@ where
b.iter_with_setup(
|| {
// Reset DB
let _ = std::fs::remove_dir_all(bench_db_path);
let _ = fs::remove_dir_all(bench_db_path);
(input, Arc::try_unwrap(create_test_rw_db_with_path(bench_db_path)).unwrap())
},
|(input, db)| {
@ -227,7 +227,7 @@ where
b.iter_with_setup(
|| {
// Reset DB
let _ = std::fs::remove_dir_all(bench_db_path);
let _ = fs::remove_dir_all(bench_db_path);
(
input.clone(),
Arc::try_unwrap(create_test_rw_db_with_path(bench_db_path)).unwrap(),
@ -253,7 +253,7 @@ where
b.iter_with_setup(
|| {
// Reset DB
let _ = std::fs::remove_dir_all(bench_db_path);
let _ = fs::remove_dir_all(bench_db_path);
(input, Arc::try_unwrap(create_test_rw_db_with_path(bench_db_path)).unwrap())
},