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

We have too many unwrap() calls in the codebase #301

Open
matthiasbeyer opened this issue Jun 16, 2021 · 2 comments
Open

We have too many unwrap() calls in the codebase #301

matthiasbeyer opened this issue Jun 16, 2021 · 2 comments
Labels
good-first-issue Good issue to solve by beginners (either Rust or this specific crate) help wanted

Comments

@matthiasbeyer
Copy link
Collaborator

Doing a quick analysis:

grep -rni unwrap -c src/ | cut -d: -f 2 | awk '{sum+=$1} END {print sum}'

gives me a shocking 53. Of course some of those (probably the majority) is in tests, where it is (IMO) appropriate to unwrap right away, but a lot of them are not in tests (after a quick less on some files).

This is rather easy to tackle IMO, maybe even for a beginner (one unwrap fixed at a time in one PR even, I am happy to mentor!)


I'll mark this as good first issue and submit it to this-week-in-rust!

@matthiasbeyer matthiasbeyer added help wanted good-first-issue Good issue to solve by beginners (either Rust or this specific crate) labels Jun 16, 2021
@Sirneij
Copy link

Sirneij commented Jun 17, 2021

I have give it a try.

@matthiasbeyer
Copy link
Collaborator Author

Cool. If you need any help, feel free to ping me on matrix @musicmatze:beyermatthi.as or via mail (see my github profile), or just open a draft PR and ask there, whatever works for you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good-first-issue Good issue to solve by beginners (either Rust or this specific crate) help wanted
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants