Skip to content

Conversation

@Iron-Ham
Copy link
Contributor

@Iron-Ham Iron-Ham commented Apr 12, 2017

Changes in this pull request

Issue fixed: #567

Checklist

  • All tests pass. Demo project builds and runs.
  • I added tests, an experiment, or detailed why my change isn't tested.
  • I added an entry to the CHANGELOG.md for any breaking changes, enhancements, or bug fixes.
  • I have reviewed the contributing guide

@iglistkit-bot
Copy link

iglistkit-bot commented Apr 12, 2017

1 Error
🚫 Any source code changes should have an entry in CHANGELOG.md.

Generated by 🚫 Danger

Copy link
Contributor

@jessesquires jessesquires left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @heshamsalman ! 🙌

Looks good to me! 💯 Just one comment.


#if DEBUG
NSSet *sectionSet = [NSSet setWithArray:sectionControllers];
IGAssert(sectionSet.count == sectionControllers.count, @"Section controllers array is not filled with unique objects; section controllers are being reused");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can remove the #if DEBUG and simply alloc the set inside the assert:

IGAssert([NSSet setWithArray:sectionControllers].count == sectionControllers.count, 
         @"......");

@facebook-github-bot
Copy link
Contributor

@heshamsalman updated the pull request - view changes

@facebook-github-bot
Copy link
Contributor

@heshamsalman updated the pull request - view changes

Copy link
Contributor

@jessesquires jessesquires left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks @heshamsalman ! 🥇

@facebook-github-bot
Copy link
Contributor

@jessesquires has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@jessesquires jessesquires added this to the 3.0.0 milestone Apr 13, 2017
@Iron-Ham Iron-Ham deleted the chore/add_uniqueness_assert branch April 13, 2017 02:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add assert that checks uniqueness of section controllers returned from data source

4 participants