Revert "Count compute units even when transaction errors (backport #22059) (#22154)" (#22175)

This reverts commit 401c542d2a.
This commit is contained in:
carllin
2021-12-30 02:39:25 -05:00
committed by GitHub
parent 6a556c5adb
commit 7efd0391e9
13 changed files with 93 additions and 305 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(())