Skip to content
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

Change assert!s for debug_assert!s #21

Closed
MauroToscano opened this issue Feb 9, 2023 · 4 comments
Closed

Change assert!s for debug_assert!s #21

MauroToscano opened this issue Feb 9, 2023 · 4 comments
Assignees
Labels
good first issue Good for newcomers

Comments

@MauroToscano
Copy link
Collaborator

MauroToscano commented Feb 9, 2023

Some functions should return a Resultinstead of using an assert because doing the latter would panic in runtime.

In general, if you don't have any choice but to panic it is better to describe the cases in which that function would panic and why in the documentation.

For this issue, we just want to replace these assertions with debug assertions. We'll address the Result in another issue.

An example would be this.

@ilitteri ilitteri added the good first issue Good for newcomers label Feb 9, 2023
@josepchetrit12
Copy link
Contributor

Can you write a short description? Thank you

@ilitteri ilitteri changed the title Change asserts for debug asserts Change assert!s for debug_assert!s Feb 10, 2023
@ilitteri
Copy link
Collaborator

Can you write a short description? Thank you

Description added!

@josepchetrit12
Copy link
Contributor

Can I take it?

@ilitteri
Copy link
Collaborator

Can I take it?

Sorry for the delay, sure you can take it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
Status: Done
Development

No branches or pull requests

3 participants