mirror of
https://github.com/apple/swift-nio
synced 2026-11-24 04:37:54 +00:00
### Motivation
The new `NoUseUnstructuredThrowingTask` diagnostic on nightly-main flags
every `Task { try await ... }`
whose result is dropped. We have a few of those.
### Changes
- Use `async let _` instead of a fire-and-forget `Task` in
`NIOAsyncWriterTests` and
`NIOThrowingAsyncSequenceTests`.
- `NIOPerformanceTester`: rethrow the error from the `Task` in
`measureAndPrint` instead of
swallowing it.
- Name the `swift-nio` dependency explicitly in
`Benchmarks/Package.swift`; SwiftPM otherwise infers
it from the directory name, which breaks in git worktrees.
### Result
No warnings. Suspended yields in the tests are cancelled when the test
returns instead of leaking
past it, and async benchmarks fail loudly.