Skip to content

Conversation

@TheBlueMatt
Copy link
Collaborator

clippy now complains that Default for the interactive tx constructor StateMachine can be auto-derived, but its a bit weird to have a Default that loads an invalid ("indeterminate") state. Instead, we replace the one line that actually cares about the Default (which uses core::mem::take) with core::mem::replace, making it more explict.

`clippy` now complains that `Default` for the interactive tx
constructor `StateMachine` can be auto-derived, but its a bit weird
to have a `Default` that loads an invalid ("indeterminate") state.
Instead, we replace the one line that actually cares about the
`Default` (which uses `core::mem::take`) with `core::mem::replace`,
making it more explict.
@ldk-reviews-bot
Copy link

ldk-reviews-bot commented Oct 30, 2025

👋 I see @joostjager was un-assigned.
If you'd like another reviewer assignment, please click here.

@TheBlueMatt TheBlueMatt mentioned this pull request Oct 30, 2025
@TheBlueMatt
Copy link
Collaborator Author

Backporting to 0.2 in #4193

`clippy` now complains about more instances of useless `vec!`s, so
we drop them here.
@TheBlueMatt TheBlueMatt changed the title Replace StateMachine::default use with core::mem::replace Fix new clippy lints Oct 30, 2025
@codecov
Copy link

codecov bot commented Oct 30, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.86%. Comparing base (7adc624) to head (3c1159c).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4195      +/-   ##
==========================================
+ Coverage   88.84%   88.86%   +0.01%     
==========================================
  Files         180      180              
  Lines      137876   137901      +25     
  Branches   137876   137901      +25     
==========================================
+ Hits       122498   122539      +41     
+ Misses      12571    12551      -20     
- Partials     2807     2811       +4     
Flag Coverage Δ
fuzzing 21.44% <ø> (+<0.01%) ⬆️
tests 88.70% <100.00%> (+0.01%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@TheBlueMatt TheBlueMatt removed the request for review from joostjager October 30, 2025 20:16
@TheBlueMatt TheBlueMatt merged commit d88f0f8 into lightningdevkit:main Oct 30, 2025
23 of 25 checks passed
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.

4 participants