ethereum / ethereum/utp

Naked Unwraps

Open
#52 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
40
Forks
20
PR merge metrics
No merged PRs in 30d

Description

I don't have a reproducible issue that I can show, but I can conclusively say that as I go about debugging this library I do run into panicked threads due to naked unwraps. In `trin` we took a firm stance against the use of naked unwraps. (According to clippy) there are 31 naked unwraps in `utp`. Some of which have documentation explaining their use. Some of which don't contain documentation. There are cases where naked unwraps are used in methods that do not return a `Result` which complicates resolving these unwraps.

I guess I'm just curious about the decision to allow naked unwraps in this library. Why? What was the criteria for using an unwrap vs implementing error handling for individual cases? It seems to me like resolving these unwraps would improve the performance of this library, but would like to get some confirmation before undertaking the task.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.