mirror of
https://github.com/apple/swift-nio
synced 2026-11-27 05:04:22 +00:00
Replace 'R' with 'Result' (#2709)
Motivation: Single letter names are discouraged but are used in a handful of places in NIOFileSystem. Modifications: - Replace 'R' with 'ReturnType' where appropriate Result: Clearer APIs
This commit is contained in:
1 parent
8c3135b7d4
commit
29e832adda
4 files changed
+33
-33
No files matched your search
@@ -700,10 +700,10 @@ 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>(
|
||||
public func withFileSystem<Result>(
|
||||
numberOfThreads: Int,
|
||||
_ body: (FileSystem) async throws -> R
|
||||
) async throws -> R {
|
||||
_ body: (FileSystem) async throws -> Result
|
||||
) async throws -> Result {
|
||||
let fileSystem = await FileSystem(numberOfThreads: numberOfThreads)
|
||||
return try await withUncancellableTearDown {
|
||||
try await body(fileSystem)
|
||||
|
||||
Reference in new issue
Block a user