Skip to content

chore: silence unwanted clippy warning in test#1566

Merged
rkrasiuk merged 1 commit intoparadigmxyz:mainfrom
TomAFrench:patch-1
Feb 27, 2023
Merged

chore: silence unwanted clippy warning in test#1566
rkrasiuk merged 1 commit intoparadigmxyz:mainfrom
TomAFrench:patch-1

Conversation

@TomAFrench
Copy link
Contributor

We're passing in incorrect ranges on purpose in this test so this clippy rule doesn't help us. I'm getting errors showing up in vscode for it however.

We're passing in incorrect ranges on purpose in this test
@TomAFrench
Copy link
Contributor Author

TomAFrench commented Feb 26, 2023

Actually on second thoughts, I think this test is slightly wrong and we want to address this clippy error. We're not testing a reversed range but an empty one. It's late, will think more on this later.

Edit: The test is correct and we want to silence the warning in this test. The trait bounds on walk_range prevent a proper reversed range so the only thing that can be passed is a empty range like is done here. It's caught by clippy here as we're passing literals but won't be in real usage where the start and end aren't known until runtime.

@codecov-commenter
Copy link

codecov-commenter commented Feb 26, 2023

Codecov Report

Merging #1566 (fba040a) into main (b1741bd) will decrease coverage by 0.03%.
The diff coverage is n/a.

📣 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

@@            Coverage Diff             @@
##             main    #1566      +/-   ##
==========================================
- Coverage   75.15%   75.12%   -0.03%     
==========================================
  Files         371      371              
  Lines       43342    43342              
==========================================
- Hits        32572    32559      -13     
- Misses      10770    10783      +13     
Flag Coverage Δ
integration-tests 21.55% <ø> (-0.03%) ⬇️
unit-tests 69.65% <ø> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
crates/storage/db/src/implementation/mdbx/mod.rs 99.18% <ø> (ø)
crates/net/discv4/src/proto.rs 89.66% <0.00%> (-3.13%) ⬇️
crates/net/eth-wire/src/capability.rs 74.26% <0.00%> (-0.74%) ⬇️
crates/stages/src/stages/sender_recovery.rs 90.95% <0.00%> (-0.54%) ⬇️
crates/stages/src/stages/hashing_storage.rs 95.65% <0.00%> (-0.28%) ⬇️
crates/net/network/src/manager.rs 52.31% <0.00%> (-0.19%) ⬇️
crates/net/network/src/session/active.rs 84.59% <0.00%> (-0.15%) ⬇️
crates/net/network/src/peers/manager.rs 82.55% <0.00%> (+0.08%) ⬆️
crates/net/eth-wire/src/ethstream.rs 84.44% <0.00%> (+0.47%) ⬆️
crates/storage/provider/src/test_utils/mock.rs 37.94% <0.00%> (+0.51%) ⬆️
... and 1 more

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

@mattsse mattsse added the C-debt A clean up/refactor of existing code label Feb 26, 2023
@rkrasiuk
Copy link
Contributor

@TomAFrench thanks!

@rkrasiuk rkrasiuk merged commit cea56f1 into paradigmxyz:main Feb 27, 2023
@TomAFrench TomAFrench deleted the patch-1 branch February 27, 2023 10:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C-debt A clean up/refactor of existing code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants