Merge PR 'Replace cloned array literal with slice::from_ref in reload test' (#5689)
What changed, and why it matters
This is a one-line code cleanup in a test file. It replaces a cloned array literal with a slice reference to silence a Rust compiler lint. There is no change to production code, no security fix, and no functional behavior change.
No action required. This is a non-security test-only lint fix.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit modifies lightning/src/ln/chanmon_update_fail_tests.rs, changing an assertion in test_outbound_reload_funding_confirmed_during_downtime from [funding_tx.clone()] to core::slice::from_ref(&funding_tx). This avoids an unnecessary clone and resolves a lint warning. It affects only test code and does not alter runtime logic.
Changed components
lightning/src/ln/chanmon_update_fail_tests.rsInspect captured patch +1 / −1
### lightning/src/ln/chanmon_update_fail_tests.rs
@@ -3520,7 +3520,7 @@ fn test_outbound_reload_funding_confirmed_during_downtime() {
expect_channel_pending_event(&nodes[0], &node_b_id);
assert_eq!(
nodes[0].tx_broadcaster.txn_broadcasted.lock().unwrap().split_off(0),
- [funding_tx.clone()]
+ core::slice::from_ref(&funding_tx)
);
let mon_ser = get_monitor!(nodes[0], chan_id).encode();Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.