Skip to content

[NFC] Using precondition instead of assert in calls that do not allow negative values #61

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 28, 2021

Conversation

LucianoPAlmeida
Copy link
Contributor

I think that makes sense to precondition instead of assert in those cases :)
It also aligns with we currently have for others like SlidingWindows.

cc @natecook1000 @kylemacomber

Replace this paragraph with a description of your changes and rationale. Provide links to an existing issue or external references/discussions, if appropriate.

Checklist

  • I've added at least one test that validates that my change is working, if appropriate
  • I've followed the code style of the rest of the project
  • I've read the Contribution Guidelines
  • I've updated the documentation if necessary

@LucianoPAlmeida
Copy link
Contributor Author

Ping @kylemacomber, @natecook1000 =]

Copy link
Member

@natecook1000 natecook1000 left a comment

Choose a reason for hiding this comment

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

Looks good! Thanks @LucianoPAlmeida 👏

@natecook1000 natecook1000 merged commit cda6fdd into apple:main Jan 28, 2021
@LucianoPAlmeida LucianoPAlmeida deleted the normalizing-assert branch January 28, 2021 23:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants