From 576ab4d1ff16fcdfbb5717117926362bc555bcc7 Mon Sep 17 00:00:00 2001 From: Ryan Nystrom Date: Sun, 6 Nov 2016 12:34:28 -0800 Subject: [PATCH] Remove NSIndexPath pretty print Summary: Saw this pop up in coverage reports. We don't log or assert `NSIndexPath` at all so this doesn't really seem necessary. - [x] All tests pass. Demo project builds and runs. - [x] I have reviewed the [contributing guide](https://github.com/Instagram/IGListKit/blob/master/CONTRIBUTING.md) Closes https://github.com/Instagram/IGListKit/pull/165 Differential Revision: D4138474 Pulled By: rnystrom fbshipit-source-id: ad8375e47d1584f594d3df29f07a1d5d1a53f3c5 --- IGListKit.xcodeproj/project.pbxproj | 12 ---------- Source/IGListAdapter.m | 1 - .../Internal/NSIndexSet+PrettyDescription.h | 16 -------------- .../Internal/NSIndexSet+PrettyDescription.m | 22 ------------------- 4 files changed, 51 deletions(-) delete mode 100644 Source/Internal/NSIndexSet+PrettyDescription.h delete mode 100644 Source/Internal/NSIndexSet+PrettyDescription.m diff --git a/IGListKit.xcodeproj/project.pbxproj b/IGListKit.xcodeproj/project.pbxproj index 459a77909..85813e41b 100644 --- a/IGListKit.xcodeproj/project.pbxproj +++ b/IGListKit.xcodeproj/project.pbxproj @@ -104,8 +104,6 @@ 88144F8F1D870F3E007C7F66 /* IGListMoveIndexPathInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 88144F521D870F3E007C7F66 /* IGListMoveIndexPathInternal.h */; settings = {ATTRIBUTES = (Private, ); }; }; 88144F911D870F3E007C7F66 /* IGListWorkingRangeHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = 88144F541D870F3E007C7F66 /* IGListWorkingRangeHandler.h */; settings = {ATTRIBUTES = (Private, ); }; }; 88144F921D870F3E007C7F66 /* IGListWorkingRangeHandler.mm in Sources */ = {isa = PBXBuildFile; fileRef = 88144F551D870F3E007C7F66 /* IGListWorkingRangeHandler.mm */; }; - 88144F931D870F3E007C7F66 /* NSIndexSet+PrettyDescription.h in Headers */ = {isa = PBXBuildFile; fileRef = 88144F561D870F3E007C7F66 /* NSIndexSet+PrettyDescription.h */; settings = {ATTRIBUTES = (Private, ); }; }; - 88144F941D870F3E007C7F66 /* NSIndexSet+PrettyDescription.m in Sources */ = {isa = PBXBuildFile; fileRef = 88144F571D870F3E007C7F66 /* NSIndexSet+PrettyDescription.m */; }; 88144F951D870F3E007C7F66 /* UICollectionView+IGListBatchUpdateData.h in Headers */ = {isa = PBXBuildFile; fileRef = 88144F581D870F3E007C7F66 /* UICollectionView+IGListBatchUpdateData.h */; settings = {ATTRIBUTES = (Private, ); }; }; 88144F961D870F3E007C7F66 /* UICollectionView+IGListBatchUpdateData.m in Sources */ = {isa = PBXBuildFile; fileRef = 88144F591D870F3E007C7F66 /* UICollectionView+IGListBatchUpdateData.m */; }; 88144F971D870F3E007C7F66 /* NSObject+IGListDiffable.h in Headers */ = {isa = PBXBuildFile; fileRef = 88144F5A1D870F3E007C7F66 /* NSObject+IGListDiffable.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -166,12 +164,10 @@ 885FE2201DC51B37009CE2B4 /* IGListSectionMap.h in Headers */ = {isa = PBXBuildFile; fileRef = 296177001D9D54E300F40F34 /* IGListSectionMap.h */; settings = {ATTRIBUTES = (Private, ); }; }; 885FE2211DC51B37009CE2B4 /* IGListStackedSectionControllerInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 296177021D9D54E300F40F34 /* IGListStackedSectionControllerInternal.h */; settings = {ATTRIBUTES = (Private, ); }; }; 885FE2221DC51B37009CE2B4 /* IGListWorkingRangeHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = 88144F541D870F3E007C7F66 /* IGListWorkingRangeHandler.h */; settings = {ATTRIBUTES = (Private, ); }; }; - 885FE2231DC51B37009CE2B4 /* NSIndexSet+PrettyDescription.h in Headers */ = {isa = PBXBuildFile; fileRef = 88144F561D870F3E007C7F66 /* NSIndexSet+PrettyDescription.h */; settings = {ATTRIBUTES = (Private, ); }; }; 885FE2241DC51B37009CE2B4 /* UICollectionView+IGListBatchUpdateData.h in Headers */ = {isa = PBXBuildFile; fileRef = 88144F581D870F3E007C7F66 /* UICollectionView+IGListBatchUpdateData.h */; settings = {ATTRIBUTES = (Private, ); }; }; 885FE2251DC51B3F009CE2B4 /* IGListAdapterProxy.m in Sources */ = {isa = PBXBuildFile; fileRef = 88144F481D870F3E007C7F66 /* IGListAdapterProxy.m */; }; 885FE2261DC51B3F009CE2B4 /* IGListDisplayHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = 88144F4B1D870F3E007C7F66 /* IGListDisplayHandler.m */; }; 885FE2271DC51B3F009CE2B4 /* IGListSectionMap.m in Sources */ = {isa = PBXBuildFile; fileRef = 296177011D9D54E300F40F34 /* IGListSectionMap.m */; }; - 885FE2281DC51B3F009CE2B4 /* NSIndexSet+PrettyDescription.m in Sources */ = {isa = PBXBuildFile; fileRef = 88144F571D870F3E007C7F66 /* NSIndexSet+PrettyDescription.m */; }; 885FE2291DC51B3F009CE2B4 /* UICollectionView+IGListBatchUpdateData.m in Sources */ = {isa = PBXBuildFile; fileRef = 88144F591D870F3E007C7F66 /* UICollectionView+IGListBatchUpdateData.m */; }; 885FE22A1DC51B3F009CE2B4 /* IGListWorkingRangeHandler.mm in Sources */ = {isa = PBXBuildFile; fileRef = 88144F551D870F3E007C7F66 /* IGListWorkingRangeHandler.mm */; }; 885FE22B1DC51B76009CE2B4 /* IGListAdapterE2ETests.m in Sources */ = {isa = PBXBuildFile; fileRef = 88144EE21D870EDC007C7F66 /* IGListAdapterE2ETests.m */; }; @@ -344,8 +340,6 @@ 88144F521D870F3E007C7F66 /* IGListMoveIndexPathInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IGListMoveIndexPathInternal.h; sourceTree = ""; }; 88144F541D870F3E007C7F66 /* IGListWorkingRangeHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IGListWorkingRangeHandler.h; sourceTree = ""; }; 88144F551D870F3E007C7F66 /* IGListWorkingRangeHandler.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = IGListWorkingRangeHandler.mm; sourceTree = ""; }; - 88144F561D870F3E007C7F66 /* NSIndexSet+PrettyDescription.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSIndexSet+PrettyDescription.h"; sourceTree = ""; }; - 88144F571D870F3E007C7F66 /* NSIndexSet+PrettyDescription.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSIndexSet+PrettyDescription.m"; sourceTree = ""; }; 88144F581D870F3E007C7F66 /* UICollectionView+IGListBatchUpdateData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UICollectionView+IGListBatchUpdateData.h"; sourceTree = ""; }; 88144F591D870F3E007C7F66 /* UICollectionView+IGListBatchUpdateData.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UICollectionView+IGListBatchUpdateData.m"; sourceTree = ""; }; 88144F5A1D870F3E007C7F66 /* NSObject+IGListDiffable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSObject+IGListDiffable.h"; sourceTree = ""; }; @@ -484,8 +478,6 @@ 296177021D9D54E300F40F34 /* IGListStackedSectionControllerInternal.h */, 88144F541D870F3E007C7F66 /* IGListWorkingRangeHandler.h */, 88144F551D870F3E007C7F66 /* IGListWorkingRangeHandler.mm */, - 88144F561D870F3E007C7F66 /* NSIndexSet+PrettyDescription.h */, - 88144F571D870F3E007C7F66 /* NSIndexSet+PrettyDescription.m */, 88144F581D870F3E007C7F66 /* UICollectionView+IGListBatchUpdateData.h */, 88144F591D870F3E007C7F66 /* UICollectionView+IGListBatchUpdateData.m */, ); @@ -613,7 +605,6 @@ 885FE2221DC51B37009CE2B4 /* IGListWorkingRangeHandler.h in Headers */, 885FE1EC1DC51B18009CE2B4 /* IGListAdapter.h in Headers */, 885FE1F21DC51B18009CE2B4 /* IGListBatchUpdateData.h in Headers */, - 885FE2231DC51B37009CE2B4 /* NSIndexSet+PrettyDescription.h in Headers */, 885FE2171DC51B37009CE2B4 /* IGListAdapterInternal.h in Headers */, 885FE1FE1DC51B18009CE2B4 /* IGListMoveIndexPath.h in Headers */, 885FE1F81DC51B18009CE2B4 /* IGListExperiments.h in Headers */, @@ -695,7 +686,6 @@ 296177031D9D54E300F40F34 /* IGListSectionControllerInternal.h in Headers */, 296177061D9D54E300F40F34 /* IGListStackedSectionControllerInternal.h in Headers */, 88144F861D870F3E007C7F66 /* IGListAdapterUpdaterInternal.h in Headers */, - 88144F931D870F3E007C7F66 /* NSIndexSet+PrettyDescription.h in Headers */, 88144F6E1D870F3E007C7F66 /* IGListIndexPathResult.h in Headers */, 88144F6B1D870F3E007C7F66 /* IGListDiffable.h in Headers */, 88144F871D870F3E007C7F66 /* IGListDisplayHandler.h in Headers */, @@ -972,7 +962,6 @@ buildActionMask = 2147483647; files = ( 885FE2141DC51B21009CE2B4 /* NSObject+IGListDiffable.m in Sources */, - 885FE2281DC51B3F009CE2B4 /* NSIndexSet+PrettyDescription.m in Sources */, 885FE2261DC51B3F009CE2B4 /* IGListDisplayHandler.m in Sources */, 885FE2251DC51B3F009CE2B4 /* IGListAdapterProxy.m in Sources */, 885FE22A1DC51B3F009CE2B4 /* IGListWorkingRangeHandler.mm in Sources */, @@ -1033,7 +1022,6 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 88144F941D870F3E007C7F66 /* NSIndexSet+PrettyDescription.m in Sources */, 88144F681D870F3E007C7F66 /* IGListCollectionView.m in Sources */, 88144F851D870F3E007C7F66 /* IGListAdapterProxy.m in Sources */, 88144F961D870F3E007C7F66 /* UICollectionView+IGListBatchUpdateData.m in Sources */, diff --git a/Source/IGListAdapter.m b/Source/IGListAdapter.m index d6800a211..c7841f0c0 100644 --- a/Source/IGListAdapter.m +++ b/Source/IGListAdapter.m @@ -15,7 +15,6 @@ #import #import "IGListSectionControllerInternal.h" -#import "NSIndexSet+PrettyDescription.h" @implementation IGListAdapter { NSMapTable *> *_cellSectionControllerMap; diff --git a/Source/Internal/NSIndexSet+PrettyDescription.h b/Source/Internal/NSIndexSet+PrettyDescription.h deleted file mode 100644 index 5c9443277..000000000 --- a/Source/Internal/NSIndexSet+PrettyDescription.h +++ /dev/null @@ -1,16 +0,0 @@ -/** - * Copyright (c) 2016-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - */ - -#import - -@interface NSIndexSet (PrettyDescription) - -- (NSString *)prettyDescription; - -@end diff --git a/Source/Internal/NSIndexSet+PrettyDescription.m b/Source/Internal/NSIndexSet+PrettyDescription.m deleted file mode 100644 index cdf9e6e85..000000000 --- a/Source/Internal/NSIndexSet+PrettyDescription.m +++ /dev/null @@ -1,22 +0,0 @@ -/** - * Copyright (c) 2016-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - */ - -#import "NSIndexSet+PrettyDescription.h" - -@implementation NSIndexSet (PrettyDescription) - -- (NSString *)prettyDescription { - NSMutableArray *indexes = [[NSMutableArray alloc] init]; - [self enumerateIndexesUsingBlock:^(NSUInteger idx, BOOL * _Nonnull stop) { - [indexes addObject:@(idx)]; - }]; - return [indexes componentsJoinedByString:@", "]; -} - -@end