From 29f55d5655dc095205f8d02e01dcd0e2583c39eb Mon Sep 17 00:00:00 2001 From: Jorge Canizales Date: Fri, 17 Jul 2015 12:19:13 -0700 Subject: Remove GRXWriter wrappers that are now unnecessary With GRXWriter a subclass of all writers, we can map the requestsWriter directly without a dumb wrapper, and return GRXImmediateWriter objects where GRXWriter is expected. --- src/objective-c/ProtoRPC/ProtoRPC.m | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'src/objective-c/ProtoRPC/ProtoRPC.m') diff --git a/src/objective-c/ProtoRPC/ProtoRPC.m b/src/objective-c/ProtoRPC/ProtoRPC.m index 067c359765..889d71a308 100644 --- a/src/objective-c/ProtoRPC/ProtoRPC.m +++ b/src/objective-c/ProtoRPC/ProtoRPC.m @@ -35,7 +35,6 @@ #import #import -#import #import @implementation ProtoRPC { @@ -65,12 +64,11 @@ format:@"A protobuf class to parse the responses must be provided."]; } // A writer that serializes the proto messages to send. - id bytesWriter = - [[[GRXForwardingWriter alloc] initWithWriter:requestsWriter] map:^id(GPBMessage *proto) { - // TODO(jcanizales): Fail with an understandable error message if the requestsWriter isn't - // sending GPBMessages. - return [proto data]; - }]; + GRXWriter *bytesWriter = [requestsWriter map:^id(GPBMessage *proto) { + // TODO(jcanizales): Fail with an understandable error message if the requestsWriter isn't + // sending GPBMessages. + return [proto data]; + }]; if ((self = [super initWithHost:host path:method.HTTPPath requestsWriter:bytesWriter])) { // A writeable that parses the proto messages received. _responseWriteable = [[GRXWriteable alloc] initWithValueHandler:^(NSData *value) { -- cgit v1.2.3