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:
Peter Adams authored and GitHub committed 2024-04-24 10:36:03 +01:00
1 parent 359c461e55
commit d3bdffd5e4
5 files changed
+14 -13

No files matched your search

+1 -1
View File
@@ -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 {