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

Fix #[warn(clippy::try_err)] in ser_macros.rs #1032

Merged
merged 2 commits into from Aug 2, 2021

Conversation

jkczyz
Copy link
Contributor

@jkczyz jkczyz commented Aug 2, 2021

Some heavily used macros are using ? directly on an Err. Using a return is easier to read and removes hundreds of linter warnings.

https://rust-lang.github.io/rust-clippy/master/index.html#try_err

@TheBlueMatt
Copy link
Collaborator

SGTM, can we set this clippy lint to required so that the lint CI check fails here?

@codecov
Copy link

codecov bot commented Aug 2, 2021

Codecov Report

Merging #1032 (b4c3a33) into main (bee9a1e) will increase coverage by 0.00%.
The diff coverage is 0.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #1032   +/-   ##
=======================================
  Coverage   90.80%   90.81%           
=======================================
  Files          60       60           
  Lines       31460    31459    -1     
=======================================
+ Hits        28568    28570    +2     
+ Misses       2892     2889    -3     
Impacted Files Coverage Δ
lightning/src/util/ser_macros.rs 96.31% <0.00%> (+0.39%) ⬆️
lightning/src/ln/functional_tests.rs 97.34% <0.00%> (+0.03%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bee9a1e...b4c3a33. Read the comment docs.

Some heavily used macros are using ? directly on an Err. Using a return
is easier to read and removes hundreds of linter warnings.

https://rust-lang.github.io/rust-clippy/master/index.html#try_err
Copy link
Collaborator

@TheBlueMatt TheBlueMatt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM if clippy is happy.

@TheBlueMatt TheBlueMatt merged commit 7dfa886 into lightningdevkit:main Aug 2, 2021
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.

None yet

3 participants