Replace cloned array literal with slice::from_ref in reload test
What changed, and why it matters
This is a one-line change in a test file to satisfy a Rust linter warning. It replaces a needless clone of a funding transaction with a reference-based slice construction. There is no functional change, no user-facing behavior change, and no security relevance.
No security action needed. This is a routine 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, replacing [funding_tx.clone()] with core::slice::from_ref(&funding_tx) inside an assert_eq! in the test_outbound_reload_funding_confirmed_during_downtime test. The change is purely to comply with Clippy’s cloned_ref_to_slice_refs lint under -D warnings. The funding_tx variable remains owned and is used later in the test. No production code is affected.
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.