units: Allow too_many_lines in test function
What changed, and why it matters
This commit adds a single Rust lint-suppression attribute to a test function so that the Clippy 'too_many_lines' warning is silenced. It does not change any runtime code, behavior, or security properties. It is purely a developer-experience change to keep CI passing after a toolchain update.
No security action required. This is a benign lint-suppression change in test code.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff inserts #[allow(clippy::too_many_lines)] above the error_display_is_non_empty test in units/src/amount/error.rs. This is a compile-time lint allowance only; it has no effect on the compiled binary, error handling logic, or public API. The commit message explicitly states the motivation is to quiet a lint that is one line below the threshold until the formatter runs with a new nightly toolchain.
Changed components
units/src/amount/error.rs (test module only)Inspect captured patch +1 / −0
diff --git a/units/src/amount/error.rs b/units/src/amount/error.rs
index 65e44dec..d0b5c4be 100644
--- a/units/src/amount/error.rs
+++ b/units/src/amount/error.rs
@@ -505,6 +505,7 @@ mod tests {
#[test]
#[cfg(feature = "alloc")]
+ #[allow(clippy::too_many_lines)] // Test could be refactored ...
fn error_display_is_non_empty() {
// A helper macro to break out a ParseAmountErrorInner type and assert display down the chain.
macro_rules! assert_amount_err {
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.