Fix code comment so formatter doesn't munge it
What changed, and why it matters
This commit only rearranges code comments in a test file to prevent an automated code formatter from reformatting them awkwardly. No program logic, behavior, or security-sensitive code was changed.
No security action needed; this is a cosmetic/documentation-only change in test code.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The change modifies comments in primitives/src/script/tests.rs within the hex() test function. It splits a multi-line trailing comment into separate block comments so that rustfmt will not munge the formatting. The actual assertions and ScriptBuf parsing calls remain identical.
Changed components
primitives/src/script/tests.rsInspect captured patch +4 / −3
diff --git a/primitives/src/script/tests.rs b/primitives/src/script/tests.rs
index ae701aa4..22ff886f 100644
--- a/primitives/src/script/tests.rs
+++ b/primitives/src/script/tests.rs
@@ -498,9 +498,10 @@ fn hex() {
let b = ScriptBuf::from_hex_no_length_prefix(raw).unwrap();
assert_eq!(a, b);
- // Sanity check - negative case.
- assert!(ScriptBuf::from_hex_prefixed(raw).is_err()); // Nice API, this misuse fails.
- // But this just puts the length prefix in the script, ouch.
+ // Sanity check - negative case. Nice API, this misuse fails.
+ assert!(ScriptBuf::from_hex_prefixed(raw).is_err()); //
+
+ // Sanity check - negative case. But this just puts the length prefix in the script, ouch.
assert!(ScriptBuf::from_hex_no_length_prefix(consensus).is_ok());
let script = ScriptBuf::from_hex_prefixed(consensus).unwrap();
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.