Skip to content

Fix unused code warnings test. #1480

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

Merged
merged 1 commit into from
May 13, 2022

Conversation

tnull
Copy link
Contributor

@tnull tnull commented May 13, 2022

This PR fixes some 'unused' warnings introduced in #1023, which mainly appear when running tests.

jkczyz
jkczyz previously approved these changes May 13, 2022
@@ -17,6 +17,7 @@ pub struct FairRwLock<T> {
waiting_writers: AtomicUsize,
}

#[cfg_attr(test, allow(dead_code))]
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why is this required? Isn't this app only built in test?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure what you mean by app in this context, but in seems the module declaration was the cause of it being built. I now hide the entire module in tests with 853bf81.

@tnull tnull force-pushed the 2022-05-fix-test-warnings branch from 853bf81 to 79f42d7 Compare May 13, 2022 16:04
@codecov-commenter
Copy link

Codecov Report

Merging #1480 (853bf81) into main (b5a6307) will not change coverage.
The diff coverage is 100.00%.

❗ Current head 853bf81 differs from pull request most recent head 79f42d7. Consider uploading reports for the commit 79f42d7 to get more accurate results

@@           Coverage Diff           @@
##             main    #1480   +/-   ##
=======================================
  Coverage   90.89%   90.89%           
=======================================
  Files          76       76           
  Lines       42067    42067           
  Branches    42067    42067           
=======================================
  Hits        38238    38238           
  Misses       3829     3829           
Impacted Files Coverage Δ
lightning/src/util/fairrwlock.rs 85.71% <ø> (ø)
lightning/src/util/test_utils.rs 77.96% <100.00%> (ø)

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 b5a6307...79f42d7. Read the comment docs.

@tnull
Copy link
Contributor Author

tnull commented May 13, 2022

Squashed.

@jkczyz jkczyz merged commit d166044 into lightningdevkit:main May 13, 2022
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.

5 participants