Revert bot formatting of two macros and add skip
What changed, and why it matters
This commit is purely a code-style change. It reverts an automated formatting bot's changes to two test macros and adds markers telling rustfmt to leave them alone in the future. There is no functional change to the program and no security relevance.
No security action needed. This is a cosmetic/style commit.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff modifies units/tests/encoding.rs only. It adds #[rustfmt::skip] attributes above two macro invocations (test_hardcoded_decoding! and test_incremental_decoding!) and reverts the multi-line tuple formatting back to single-line form. The macro arguments and test logic are identical; only whitespace and formatting directives changed.
Changed components
units/tests/encoding.rsInspect captured patch +4 / −8
diff --git a/units/tests/encoding.rs b/units/tests/encoding.rs
index 0c0f0db7..5fb37fb5 100644
--- a/units/tests/encoding.rs
+++ b/units/tests/encoding.rs
@@ -110,6 +110,7 @@ fn amount_hardcoded_encoding() {
assert_eq!(encoded, [0x00, 0xe1, 0xf5, 0x05, 0x00, 0x00, 0x00, 0x00]);
}
+#[rustfmt::skip]
test_hardcoded_decoding!(
amount_hardcoded_decoding,
AmountDecoder,
@@ -118,10 +119,7 @@ test_hardcoded_decoding!(
([0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], Amount::ONE_SAT),
([0x00, 0xe1, 0xf5, 0x05, 0x00, 0x00, 0x00, 0x00], Amount::ONE_BTC), // 100_000_000 sats
([0x00, 0xe1, 0xf5, 0x05, 0x00, 0x00, 0x00, 0x00], Amount::from_sat(100_000_000).unwrap()), // 1 BTC
- (
- [0x00, 0x40, 0x07, 0x5a, 0xf0, 0x75, 0x07, 0x00],
- Amount::from_sat(21_000_000 * 100_000_000).unwrap()
- ), // 21M BTC
+ ([0x00, 0x40, 0x07, 0x5a, 0xf0, 0x75, 0x07, 0x00], Amount::from_sat(21_000_000 * 100_000_000).unwrap()), // 21M BTC
);
test_decoder_default!(amount_decoder_default, Amount, AmountDecoder, 8);
@@ -137,6 +135,7 @@ test_round_trip!(
Amount::from_sat(21_000_000 * 100_000_000).unwrap(), // 21 million BTC
);
+#[rustfmt::skip]
test_incremental_decoding!(
amount_incremental_decoding,
AmountDecoder,
@@ -145,10 +144,7 @@ test_incremental_decoding!(
([0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], Amount::ONE_SAT),
([0x00, 0xe1, 0xf5, 0x05, 0x00, 0x00, 0x00, 0x00], Amount::ONE_BTC), // 100_000_000 sats
([0x00, 0xe1, 0xf5, 0x05, 0x00, 0x00, 0x00, 0x00], Amount::from_sat(100_000_000).unwrap()), // 1 BTC
- (
- [0x00, 0x40, 0x07, 0x5a, 0xf0, 0x75, 0x07, 0x00],
- Amount::from_sat(21_000_000 * 100_000_000).unwrap()
- ), // 21M BTC
+ ([0x00, 0x40, 0x07, 0x5a, 0xf0, 0x75, 0x07, 0x00], Amount::from_sat(21_000_000 * 100_000_000).unwrap()), // 21M BTC
);
// BlockHeight encodes as 4-byte little-endian u32.
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.