Change PhantomData field names to _marker
What changed, and why it matters
This commit simply renames a Rust internal field from `marker` to `_marker` in one struct. It is a pure code-style cleanup with no functional, security, or API change.
No security action needed. Treat as normal refactoring.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch changes the field name of a PhantomData<V> marker in primitives/src/block.rs from marker to _marker to follow Rust std naming conventions. All struct literal initializations are updated accordingly. PhantomData is a zero-sized type used only for variance/type-system purposes; renaming it cannot affect runtime behavior, memory layout, serialization, or security properties.
Changed components
primitives/src/block.rsInspect captured patch +3 / −3
diff --git a/primitives/src/block.rs b/primitives/src/block.rs
index 63470560..7e010a84 100644
--- a/primitives/src/block.rs
+++ b/primitives/src/block.rs
@@ -80,7 +80,7 @@ where
/// Cached witness root if it's been computed.
witness_root: Option<WitnessMerkleNode>,
/// Validation marker.
- marker: PhantomData<V>,
+ _marker: PhantomData<V>,
}
#[cfg(feature = "alloc")]
@@ -88,7 +88,7 @@ impl Block<Unchecked> {
/// Constructs a new `Block` without doing any validation.
#[inline]
pub fn new_unchecked(header: Header, transactions: Vec<Transaction>) -> Self {
- Self { header, transactions, witness_root: None, marker: PhantomData::<Unchecked> }
+ Self { header, transactions, witness_root: None, _marker: PhantomData::<Unchecked> }
}
/// Ignores block validation logic and just assumes you know what you are doing.
@@ -101,7 +101,7 @@ impl Block<Unchecked> {
header: self.header,
transactions: self.transactions,
witness_root,
- marker: PhantomData::<Checked>,
+ _marker: PhantomData::<Checked>,
}
}
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.