pow: Move error module re-export to the correct place
What changed, and why it matters
This commit is a purely cosmetic code cleanup. It moves a public re-export statement to the top of a source file so the file is better organized. There is no functional change, no bug fix, and no security relevance.
No action required; this is a non-security refactoring change.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The change relocates a pub use self::error::CompactTargetDecoderError; re-export from after the Target/Work type definitions to the top of units/src/pow.rs, just below the private use statements. The re-export remains identical (same attributes, same visibility, same feature gate). No API, behavior, or logic is altered.
Changed components
units/src/pow.rsInspect captured patch +5 / −5
diff --git a/units/src/pow.rs b/units/src/pow.rs
index 1c7ccee6..8fdffef6 100644
--- a/units/src/pow.rs
+++ b/units/src/pow.rs
@@ -12,6 +12,11 @@ use serde::{Deserialize, Serialize};
use crate::parse_int::{self, ParseIntError, PrefixedHexError, UnprefixedHexError};
+#[rustfmt::skip] // Keep public re-exports separate.
+#[cfg(feature = "encoding")]
+#[doc(no_inline)]
+pub use self::error::CompactTargetDecoderError;
+
/// Implement traits and methods shared by `Target` and `Work`.
macro_rules! do_impl {
($ty:ident, $err_ty:ident) => {
@@ -248,11 +253,6 @@ impl Target {
}
do_impl!(Target, ParseTargetError);
-#[rustfmt::skip] // Keep public re-exports separate.
-#[cfg(feature = "encoding")]
-#[doc(no_inline)]
-pub use self::error::CompactTargetDecoderError;
-
/// Encoding of 256-bit target as 32-bit float.
///
/// This is used to encode a target into the block header. Satoshi made this part of consensus code
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.