Revert "Count compute units even when transaction errors (#22059)" (#22174)

This reverts commit eaa8c67bde.
This commit is contained in:
carllin
2021-12-30 02:42:32 -05:00
committed by GitHub
parent 135af08b8b
commit 33d0b5e011
13 changed files with 97 additions and 295 deletions

View File

@ -102,10 +102,10 @@ thread_local!(static PAR_THREAD_POOL: RefCell<ThreadPool> = RefCell::new(rayon::
.unwrap())
);
fn first_err<T>(results: &[Result<T>]) -> Result<()> {
fn first_err(results: &[Result<()>]) -> Result<()> {
for r in results {
if let Err(e) = r {
return Err(e.clone());
if r.is_err() {
return r.clone();
}
}
Ok(())