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:
parent
b180113d81
commit
1db0be8ed9
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue