Skip to content
This repository has been archived by the owner on Jun 23, 2021. It is now read-only.

Commit

Permalink
Simplify CargoBayProductRequestDelegate init
Browse files Browse the repository at this point in the history
Success and failure blocks are `(copy)` properties, no need to redefine them
  • Loading branch information
vtourraine committed Mar 27, 2014
1 parent 677fcc1 commit 627d03f
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions CargoBay/CargoBay.m
Original file line number Diff line number Diff line change
Expand Up @@ -1080,18 +1080,9 @@ - (id)initWithSuccess:(void (^)(NSArray *, NSArray *))success
return nil;
}

self.success = ^(NSArray *products, NSArray *invalidIdentifiers) {
if (success) {
success(products, invalidIdentifiers);
}
};

self.failure = ^(NSError *error) {
if (failure) {
failure(error);
}
};

self.success = success;
self.failure = failure;

return self;
}

Expand Down

0 comments on commit 627d03f

Please sign in to comment.