mirror of
https://github.com/oxc-project/oxc.git
synced 2026-11-04 10:29:58 +00:00
fix(tasks): propagate io::copy errors during benchmark file download (#12813)
Codspeed left this comment on my PR. The perf increase is obviously wrong, the only way i could see this happening is if it failed to copy. this PR updates it to propogate the error so that we know when something fails, rather than having codspeed log incorrect perf differences 
This commit is contained in:
1 parent
69fd08d4d7
commit
13f0658f88
1 file changed
+1
-1
@@ -113,7 +113,7 @@ impl TestFile {
|
||||
|
||||
let _drop = std::fs::remove_file(&file);
|
||||
let mut writer = std::fs::File::create(&file).map_err(err_to_string)?;
|
||||
let _drop = std::io::copy(&mut reader, &mut writer);
|
||||
std::io::copy(&mut reader, &mut writer).map_err(err_to_string)?;
|
||||
|
||||
std::fs::read_to_string(&file)
|
||||
.map_err(err_to_string)
|
||||
|
||||
Reference in new issue
Block a user