mirror of
https://github.com/apple/swift-nio
synced 2026-11-25 04:47:49 +00:00
Remove surplus Sendable requirements from FileSystem with methods (#2706)
Motivation: Many of the filesystem with methods have a requirement that the result type is sendable. In most cases this is not required as the result is not shared or sent. Modifications: Remove sendable requirement for result types where it is not required. Result: Users will not have to make so many types sendable.
This commit is contained in:
1 parent
359c461e55
commit
d3bdffd5e4
5 files changed
+14
-13
No files matched your search
@@ -700,7 +700,7 @@ extension FileSystemProtocol where Self == FileSystem {
|
||||
|
||||
/// Provides temporary scoped access to a ``FileSystem`` with the given number of threads.
|
||||
@available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *)
|
||||
public func withFileSystem<R: Sendable>(
|
||||
public func withFileSystem<R>(
|
||||
numberOfThreads: Int,
|
||||
_ body: (FileSystem) async throws -> R
|
||||
) async throws -> R {
|
||||
|
||||
Reference in new issue
Block a user