What changed, and why it matters
This commit removes unnecessary uses of the `concat!` macro in test code. The `concat!` macro was being called with only a single string literal, which has no effect. The change is purely cosmetic and only affects unit tests in a serialization utility module. There is no security relevance.
No action required. This is a non-functional cleanup change in test code.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch modifies lightning/src/util/ser_macros.rs test cases to replace concat!("literal") with the literal string directly. Since concat! with a single argument is a no-op, this is a code cleanup with no functional change. The affected lines are test inputs for TLV decoding edge cases, but the byte sequences passed to do_test! remain identical before and after the change.
Changed components
lightning/src/util/ser_macros.rs (unit tests only)Inspect captured patch +3 / −3
diff --git a/lightning/src/util/ser_macros.rs b/lightning/src/util/ser_macros.rs
index c3cf204..ea7a3e8 100644
--- a/lightning/src/util/ser_macros.rs
+++ b/lightning/src/util/ser_macros.rs
@@ -1677,9 +1677,9 @@ mod tests {
}
// TLVs from the BOLT test cases which should not decode as either n1 or n2
- do_test!(concat!("fd01"), ShortRead);
+ do_test!("fd01", ShortRead);
do_test!(concat!("fd0001", "00"), InvalidValue);
- do_test!(concat!("fd0101"), ShortRead);
+ do_test!("fd0101", ShortRead);
do_test!(concat!("0f", "fd"), ShortRead);
do_test!(concat!("0f", "fd26"), ShortRead);
do_test!(concat!("0f", "fd2602"), ShortRead);
@@ -1763,7 +1763,7 @@ mod tests {
};
}
- do_test!(concat!(""), None, None, None, None);
+ do_test!("", None, None, None, None);
do_test!(concat!("21", "00"), None, None, None, None);
do_test!(concat!("fd0201", "00"), None, None, None, None);
do_test!(concat!("fd00fd", "00"), None, None, None, None);
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.