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:
Bas Broek authored and Norman Maurer committed 2018-03-19 14:43:55 +01:00
1 parent b180113d81
commit 1db0be8ed9
2 files changed
+4 -4

No files matched your search

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