-
Notifications
You must be signed in to change notification settings - Fork 407
Fix build warnings #2374
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 build warnings #2374
Conversation
arik-so
commented
Jun 24, 2023
- Fix warning about legacy deserialization prevention markers
- Fix warning about public keys from hex
- Fix warning about dummy HTLCSource type
efcec42
to
2ba7c4f
Compare
Codecov ReportPatch coverage:
❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more. Additional details and impacted files@@ Coverage Diff @@
## main #2374 +/- ##
=======================================
Coverage 90.32% 90.32%
=======================================
Files 106 106
Lines 54948 54948
Branches 54948 54948
=======================================
Hits 49630 49630
Misses 5318 5318
☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Could we also fix these while we're at it?
warning: variable does not need to be mutable
--> lightning/src/routing/router.rs:420:9
|
420 | for (mut path, blinded_tail_opt) in paths.iter_mut().zip(blinded_tails.into_iter()) {
| ----^^^^
| |
| help: remove this `mut`
|
= note: `#[warn(unused_mut)]` on by default
warning: variable does not need to be mutable
--> lightning/src/routing/router.rs:1224:8
|
1224 | let mut cur_hop = &mut self.hops.get_mut(i).unwrap().0;
| ----^^^^^^^
| |
| help: remove this `mut`
warning: using `.clone()` on a double reference, which returns `&dyn BroadcasterInterface` instead of cloning the inner type
--> lightning/src/ln/reload_tests.rs:387:108
|
387 | new_chain_monitor = test_utils::TestChainMonitor::new(Some(nodes[0].chain_source), nodes[0].tx_broadcaster.clone(), &logger, &fee_estimator, &persister, keys_manager);
Oh yeah, let's fix those other two. Interestingly, they actually did not show up last night in my build. |
Specifically, the legacy deserialization prevention marker variable was not being read.
I'll think about how to fix the one in line 387. |
2ba7c4f
to
8c982a3
Compare
I'm not getting that warning about the clone. Which rust version are you using? |
|
Oops, nvm I'm blind |