Skip to content

Remove unnecessary try from AsyncStream next() in tests - #273

Merged
swhitty merged 1 commit into
mainfrom
fix-unneeded-try
Nov 15, 2026
Merged

swhitty merged 1 commit into
mainfrom
fix-unneeded-try

Conversation

@swhitty

@swhitty swhitty commented Nov 15, 2026

Copy link
Copy Markdown
Owner

Fixes the four "no calls to throwing functions occur within 'try' expression" warnings Swift 6.4 reports inside #expect, in WSHandlerTests (3) and AsyncStream+WSFrameTests (1). AsyncStream's iterator next() doesn't throw.

These are the warnings #272 annotates, so merge that first to see them reported.

Testing

  • macOS, Swift 6.4.2: a full build has no warnings, and all tests pass.
  • Linux via container: Swift 6.0 and 6.4 build without warnings and pass.

🤖 Generated with Claude Code

AsyncStream's iterator next() doesn't throw, so Swift 6.4 warns that the
try inside these #expect calls is unnecessary.
@codecov

codecov Bot commented Nov 15, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.75%. Comparing base (7ab6440) to head (ed6e9c9).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #273      +/-   ##
==========================================
- Coverage   93.88%   93.75%   -0.13%     
==========================================
  Files          73       73              
  Lines        4022     4022              
==========================================
- Hits         3776     3771       -5     
- Misses        246      251       +5     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

@swhitty
swhitty merged commit 90dbd69 into main Nov 15, 2026
14 of 15 checks passed
@swhitty
swhitty deleted the fix-unneeded-try branch November 16, 2026 01:34
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.

1 participant