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 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
@dongsupark dongsupark merged commit b6b48fe into trunk Nov 30, 2023
1 check passed
@dongsupark dongsupark deleted the dongsu/unwrap-no-panic branch November 30, 2023 16:14
dongsupark added a commit to flatcar/scripts that referenced this pull request Dec 7, 2023
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.

Use error handling instead of unwrap to avoid panics
2 participants