Skip to content

Conversation

Uzlopak
Copy link
Contributor

@Uzlopak Uzlopak commented Aug 24, 2025

This relates to...

Rationale

Changes

Features

Bug Fixes

Breaking Changes and Deprecations

Status

Copy link
Member

@KhafraDev KhafraDev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Uzlopak
Copy link
Contributor Author

Uzlopak commented Aug 25, 2025

See my answer to your linked comment.

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Copy link
Member

@gurgunday gurgunday left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@Uzlopak Uzlopak requested a review from Copilot September 6, 2025 06:55
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR improves performance in the extractBody function by reducing the use of async/await syntax in favor of explicit promise handling.

  • Removes async/await from ReadableStream controller methods
  • Converts async functions to return promises directly using .then()
  • Simplifies promise handling in iterator operations

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

async cancel (reason) {
await iterator.return()
cancel (reason) {
return iterator.return()
Copy link
Preview

Copilot AI Sep 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The iterator.return() call may not exist on all iterators, as it's an optional method in the async iterator protocol. This could cause a runtime error if the iterator doesn't implement the return method. Consider checking if the method exists before calling it: return iterator.return?.() || Promise.resolve().

Suggested change
return iterator.return()
return iterator.return?.() || Promise.resolve()

Copilot uses AI. Check for mistakes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants