Files
Daiki Matsudate 68624c7abd Drop @unchecked from TokenBucket's Sendable conformance (#3774)
Drop `@unchecked` from `TokenBucket`'s `Sendable` conformance.

### Motivation:

`TokenBucket` (in both `NIOFS` and `_NIOFileSystem`) is marked
`@unchecked Sendable`, but its only stored property is `private let
lock: NIOLockedValueBox<State>`, and `NIOLockedValueBox` is `Sendable`
when its value is (`State` holds an `Int` and a
`Deque<CheckedContinuation<Void, Never>>`). The compiler can verify this
conformance on its own, and keeping `@unchecked` means it would not
catch a future change that breaks sendability.

### Modifications:

- Replace `@unchecked Sendable` with `Sendable` on `TokenBucket` in
`NIOFS` and `_NIOFileSystem`.

### Result:

No behavior change; the conformance is now checked by the compiler.

Verified locally on macOS (Swift 6.4.2): `swift build --build-tests
-Xswiftc -strict-concurrency=complete` produces no new diagnostics, and
`NIOFSTests`, `NIOFSIntegrationTests` and `NIOFSFoundationCompatTests`
pass.
2026-11-02 08:47:19 +00:00
..