Skip to content
New issue

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

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

Already on GitHub? # to your account

change unwrap to ok_or or unwrap_or #39

Merged
merged 1 commit into from
Nov 30, 2023
Merged

Conversation

dongsupark
Copy link
Member

@dongsupark dongsupark commented Nov 30, 2023

Replace a plain unwrap() with ok_or or unwrap_or, to prevent from binaries or libs from panicking at runtime.

Fixes #34

@dongsupark dongsupark changed the title change unwrap to ok_or or unwrap_or{_default} change unwrap to ok_or or unwrap_or{,_default} Nov 30, 2023
@dongsupark dongsupark force-pushed the dongsu/unwrap-no-panic branch from cf40389 to ac37636 Compare November 30, 2023 15:09
Replace a plain `unwrap()` with `ok_or` or `unwrap_or` to prevent
from binaries or libs from panicking at runtime.
@dongsupark dongsupark changed the title change unwrap to ok_or or unwrap_or{,_default} change unwrap to ok_or or unwrap_or Nov 30, 2023
@dongsupark dongsupark force-pushed the dongsu/unwrap-no-panic branch from ac37636 to 3f91354 Compare November 30, 2023 15:38
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use error handling instead of unwrap to avoid panics
2 participants