Count compute units even when transaction errors (#22059)
This commit is contained in:
@ -102,10 +102,10 @@ thread_local!(static PAR_THREAD_POOL: RefCell<ThreadPool> = RefCell::new(rayon::
|
||||
.unwrap())
|
||||
);
|
||||
|
||||
fn first_err(results: &[Result<()>]) -> Result<()> {
|
||||
fn first_err<T>(results: &[Result<T>]) -> Result<()> {
|
||||
for r in results {
|
||||
if r.is_err() {
|
||||
return r.clone();
|
||||
if let Err(e) = r {
|
||||
return Err(e.clone());
|
||||
}
|
||||
}
|
||||
Ok(())
|
||||
|
Reference in New Issue
Block a user