mirror of
https://github.com/apple/swift-nio
synced 2026-11-28 05:14:23 +00:00
Infer return types
Motivation: Removes unncessary explicit types that are inferred. Modifications: Infer types that are being returned from a function or computed variable. Result: Cleans up the code.
This commit is contained in:
1 parent
b180113d81
commit
1db0be8ed9
2 files changed
+4
-4
No files matched your search
@@ -920,11 +920,11 @@ private extension CloseMode {
|
||||
var error: ChannelError {
|
||||
switch self {
|
||||
case .all:
|
||||
return ChannelError.alreadyClosed
|
||||
return .alreadyClosed
|
||||
case .output:
|
||||
return ChannelError.outputClosed
|
||||
return .outputClosed
|
||||
case .input:
|
||||
return ChannelError.inputClosed
|
||||
return .inputClosed
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -333,7 +333,7 @@ final class PendingStreamWritesManager: PendingWritesManager {
|
||||
return try triggerScalarFileWrite(scalarFileWriteOperation)
|
||||
case .nothingToBeWritten:
|
||||
assertionFailure("called \(#function) with nothing available to be written")
|
||||
return OneWriteOperationResult.writtenCompletely
|
||||
return .writtenCompletely
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user