Skip to content

Commit 6c0733e

Browse files
authored
polish: remove a few superfluous awaits (#4635)
1 parent 4399655 commit 6c0733e

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/execution/mapAsyncIterable.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,11 @@ export function mapAsyncIterable<T, U>(
1616
const throwFn = iterator.throw?.bind(iterator);
1717

1818
const onReturn = returnFn
19-
? async () => {
20-
await callIgnoringErrors(returnFn);
21-
}
19+
? () => callIgnoringErrors(returnFn)
2220
: () => Promise.resolve();
2321

2422
const onThrow = throwFn
25-
? async (reason?: unknown) => {
26-
await callIgnoringErrors(() => throwFn(reason));
27-
}
23+
? (reason?: unknown) => callIgnoringErrors(() => throwFn(reason))
2824
: onReturn;
2925

3026
return withConcurrentAbruptClose(

0 commit comments

Comments
 (0)