What changed, and why it matters
This is a minor code cleanup that fixes a compiler warning (Clippy 'unused import') when tests are built with no default features. It does not change any behavior or fix any security issue.
No security action needed; treat as routine maintenance.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit gates the MathOp import behind the alloc feature in units/src/amount/tests.rs, because it is only used when the alloc feature is enabled. NumOpResult remains unconditionally imported. This is purely a lint fix with no functional or security impact.
Changed components
units/src/amount/tests.rsInspect captured patch +3 / −1
diff --git a/units/src/amount/tests.rs b/units/src/amount/tests.rs
index a62c1e73..4a702e45 100644
--- a/units/src/amount/tests.rs
+++ b/units/src/amount/tests.rs
@@ -11,7 +11,9 @@ use core::num::{NonZeroI64, NonZeroU64};
use std::panic;
use super::*;
-use crate::result::{MathOp, NumOpResult};
+use crate::result::NumOpResult;
+#[cfg(feature = "alloc")]
+use crate::result::MathOp;
#[cfg(feature = "alloc")]
use crate::{FeeRate, Weight};
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.