Skip to content

fs: fix inaccurate comment on ReadStream._destroy

d689597
Select commit
Loading
Failed to load commit list.
Open

fs: reject async iterator with ERR_STREAM_PREMATURE_CLOSE when destroy() is called during iteration #30920

fs: fix inaccurate comment on ReadStream._destroy
d689597
Select commit
Loading
Failed to load commit list.
Claude / Claude Code Review completed May 17, 2026 in 20m 47s

Code review found 1 potential issue

Found 3 candidates, confirmed 1. See review comments for details.

Details

Severity Count
🔴 Important 0
🟡 Nit 1
🟣 Pre-existing 0
Severity File:Line Issue
🟡 Nit src/js/internal/fs/streams.ts:347-353 kReadStreamFastPath is now write-only dead code

Annotations

Check warning on line 353 in src/js/internal/fs/streams.ts

See this annotation in the file changed.

@claude claude / Claude Code Review

kReadStreamFastPath is now write-only dead code

Nit: with the `_destroy` branch removed, `kReadStreamFastPath` is now write-only — the symbol declaration (L43, plus its 4-line comment), the constructor assignment at L209-215, and the commented-out `pipe` stub at L399 are the only remaining references, and none of them read it. Fine to leave as scaffolding for the future pipe fast-path the comment describes, but if that's not on the near-term roadmap you could drop them in this PR while you're here.