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

Remove all unwraps from runtime code #584

Merged
merged 2 commits into from
Apr 26, 2023
Merged

Remove all unwraps from runtime code #584

merged 2 commits into from
Apr 26, 2023

Conversation

1xstj
Copy link
Contributor

@1xstj 1xstj commented Apr 26, 2023

Summary of changes
Changes introduced in this pull request:

  • Replace unwrap() with errors where possible
  • In infallible functions, use expect() instead
  • Add unwrap check to clippy CI
  • Add allow unwrap to test files

Reference issue to close (if applicable)
Closes #572

@codecov-commenter
Copy link

Codecov Report

Patch coverage: 26.32% and project coverage change: -0.12 ⚠️

Comparison is base (0d8321c) 19.07% compared to head (dcd4f69) 18.94%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #584      +/-   ##
==========================================
- Coverage   19.07%   18.94%   -0.12%     
==========================================
  Files          75       75              
  Lines        4978     5016      +38     
==========================================
+ Hits          949      950       +1     
- Misses       4029     4066      +37     
Impacted Files Coverage Δ
...gadget/src/async_protocols/blockchain_interface.rs 0.00% <0.00%> (ø)
dkg-gadget/src/async_protocols/incoming.rs 0.00% <0.00%> (ø)
dkg-gadget/src/async_protocols/mod.rs 0.00% <0.00%> (ø)
dkg-gadget/src/async_protocols/sign/handler.rs 0.00% <0.00%> (ø)
dkg-gadget/src/debug_logger.rs 0.00% <ø> (ø)
...-gadget/src/gossip_messages/misbehaviour_report.rs 0.00% <0.00%> (ø)
...kg-gadget/src/gossip_messages/public_key_gossip.rs 0.00% <0.00%> (ø)
dkg-gadget/src/worker.rs 0.00% <0.00%> (ø)
dkg-runtime-primitives/src/lib.rs 36.00% <ø> (ø)
pallets/bridge-registry/src/lib.rs 0.00% <0.00%> (ø)
... and 5 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@1xstj 1xstj added the wip 🚧 Tasks or issues that are considered a work in-progress label Apr 26, 2023
@1xstj 1xstj removed the wip 🚧 Tasks or issues that are considered a work in-progress label Apr 26, 2023
@1xstj 1xstj requested review from drewstone and shekohex April 26, 2023 19:35
@1xstj 1xstj marked this pull request as ready for review April 26, 2023 19:35
@drewstone drewstone merged commit 58d5251 into master Apr 26, 2023
@drewstone drewstone deleted the remove-unwrap branch April 26, 2023 19:45
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.

[TASK] Ensure all unwrap is removed and add check to CI
4 participants