aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/objective-c/ProtoRPC
diff options
context:
space:
mode:
authorGravatar Muxi Yan <mxyan@google.com>2018-12-06 22:41:03 -0800
committerGravatar Muxi Yan <mxyan@google.com>2018-12-06 22:41:03 -0800
commitf0f6e03212837c67d7e078e6f33074e80aa4bcc0 (patch)
tree28cf8e66afe60a741dda4fe07db29ff65dac6919 /src/objective-c/ProtoRPC
parent1a9404876ce0315fc05fe82465dc389600db0965 (diff)
clang-format
Diffstat (limited to 'src/objective-c/ProtoRPC')
-rw-r--r--src/objective-c/ProtoRPC/ProtoRPC.m24
1 files changed, 14 insertions, 10 deletions
diff --git a/src/objective-c/ProtoRPC/ProtoRPC.m b/src/objective-c/ProtoRPC/ProtoRPC.m
index 89f0b3f347..da53435178 100644
--- a/src/objective-c/ProtoRPC/ProtoRPC.m
+++ b/src/objective-c/ProtoRPC/ProtoRPC.m
@@ -97,9 +97,12 @@ static NSError *ErrorForBadProto(id proto, Class expectedClass, NSError *parsing
responseHandler:(id<GRPCProtoResponseHandler>)handler
callOptions:(GRPCCallOptions *)callOptions
responseClass:(Class)responseClass {
- NSAssert(requestOptions.host.length != 0 && requestOptions.path.length != 0 && requestOptions.safety <= GRPCCallSafetyCacheableRequest, @"Invalid callOptions.");
+ NSAssert(requestOptions.host.length != 0 && requestOptions.path.length != 0 &&
+ requestOptions.safety <= GRPCCallSafetyCacheableRequest,
+ @"Invalid callOptions.");
NSAssert(handler != nil, @"handler cannot be empty.");
- if (requestOptions.host.length == 0 || requestOptions.path.length == 0 || requestOptions.safety > GRPCCallSafetyCacheableRequest) {
+ if (requestOptions.host.length == 0 || requestOptions.path.length == 0 ||
+ requestOptions.safety > GRPCCallSafetyCacheableRequest) {
return nil;
}
if (handler == nil) {
@@ -150,12 +153,12 @@ static NSError *ErrorForBadProto(id proto, Class expectedClass, NSError *parsing
self->_handler = nil;
}
[copiedHandler didCloseWithTrailingMetadata:nil
- error:[NSError errorWithDomain:kGRPCErrorDomain
- code:GRPCErrorCodeCancelled
- userInfo:@{
- NSLocalizedDescriptionKey :
- @"Canceled by app"
- }]];
+ error:[NSError errorWithDomain:kGRPCErrorDomain
+ code:GRPCErrorCodeCancelled
+ userInfo:@{
+ NSLocalizedDescriptionKey :
+ @"Canceled by app"
+ }]];
});
} else {
_handler = nil;
@@ -223,8 +226,9 @@ static NSError *ErrorForBadProto(id proto, Class expectedClass, NSError *parsing
copiedHandler = self->_handler;
self->_handler = nil;
}
- [copiedHandler didCloseWithTrailingMetadata:nil
- error:ErrorForBadProto(message, _responseClass, error)];
+ [copiedHandler
+ didCloseWithTrailingMetadata:nil
+ error:ErrorForBadProto(message, _responseClass, error)];
});
[_call cancel];
_call = nil;