What changed, and why it matters
This commit only adds missing test coverage for public API surface. It adds a new error type to an existing test struct and a new test that checks public types from the `result` module can be imported. There is no code behavior change, no bug fix, and no security relevance.
No security action needed. This is a routine test-maintenance commit.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff modifies units/tests/api.rs, a test-only file. It adds result::NumOpError to an Errors struct used in API surface tests and adds a new test api_can_use_all_types_from_module_result verifying that bitcoin_units::result::{MathOp, NumOpError, NumOpResult} are publicly importable. No production code is changed.
Changed components
units/tests/api.rsInspect captured patch +6 / −0
diff --git a/units/tests/api.rs b/units/tests/api.rs
index 167db030..886a7cc0 100644
--- a/units/tests/api.rs
+++ b/units/tests/api.rs
@@ -161,6 +161,7 @@ struct Errors {
v: parse_int::UnprefixedHexError,
#[cfg(feature = "encoding")]
w: pow::CompactTargetDecoderError,
+ x: result::NumOpError,
}
/// A struct that includes all public decoder error types.
@@ -267,6 +268,11 @@ fn api_can_use_all_types_from_module_parse() {
use bitcoin_units::parse_int::{ParseIntError, PrefixedHexError, UnprefixedHexError};
}
+#[test]
+fn api_can_use_all_types_from_module_result() {
+ use bitcoin_units::result::{MathOp, NumOpError, NumOpResult};
+}
+
#[test]
fn api_can_use_all_types_from_module_pow() {
use bitcoin_units::pow::CompactTarget;
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.