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

Deny uses of .unwrap() in non-test code (first pass) #850

Merged
merged 11 commits into from
May 25, 2021
Merged

Conversation

romac
Copy link
Member

@romac romac commented Apr 26, 2021

Closes: #871

@romac romac requested a review from ancazamfir as a code owner April 26, 2021 16:25
@romac romac marked this pull request as draft April 26, 2021 16:26
adizere added 3 commits April 29, 2021 15:26
- Replaced the `impl From<Infallible> for Kind` block with `trait UnwrapInfallible`
following the approach of crate unwrap-infallible.
- H/T @romac for the guidance.
@adizere adizere marked this pull request as ready for review April 29, 2021 17:57
@codecov-commenter

This comment has been minimized.

@romac romac marked this pull request as draft May 6, 2021 07:56
@adizere adizere changed the title Deny uses of .unwrap() in non-test code Deny uses of .unwrap() in non-test code (first pass) May 25, 2021
@adizere adizere marked this pull request as ready for review May 25, 2021 12:02
@adizere adizere self-requested a review as a code owner May 25, 2021 12:02
@adizere adizere merged commit 3946388 into master May 25, 2021
@adizere adizere deleted the romac/deny-unwrap branch May 25, 2021 14:57
hu55a1n1 pushed a commit to hu55a1n1/hermes that referenced this pull request Sep 13, 2022
…ms#850)

* Deny uses of `.unwrap()` in non-test code

* Infallible error case for Height conversion. Cleaned unwraps in transfer.rs.

* More unwrap fixes in modules & lazy ok_or.

* Added simpler approach for converting from a Result<_, Infallible>.

- Replaced the `impl From<Infallible> for Kind` block with `trait UnwrapInfallible`
following the approach of crate unwrap-infallible.
- H/T @romac for the guidance.

* More unwrap fixes

* More unwrap fixes

* Permit unwraps again. Add TODO note

* Changelog, permit unwrap in relayer and added TODO

* FMT

Co-authored-by: Adi Seredinschi <adi@informal.systems>
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.

Deny uses of unwrap in non-test code (first pass)
3 participants