What changed, and why it matters
This commit fixes a minor Rust API guideline compliance issue in how a script builder object is printed for debugging. It changes the debug output so that an empty builder prints 'Builder()' instead of an empty string. There is no security impact.
No security action needed. Treat as a normal code-quality/API-guideline fix.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The Builder
Changed components
primitives/src/script/builder.rsInspect captured patch +3 / −1
diff --git a/primitives/src/script/builder.rs b/primitives/src/script/builder.rs
index b0cc69f3..11eda615 100644
--- a/primitives/src/script/builder.rs
+++ b/primitives/src/script/builder.rs
@@ -79,7 +79,9 @@ impl<T> fmt::Display for Builder<T> {
}
impl<T> fmt::Debug for Builder<T> {
- fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { fmt::Display::fmt(self, f) }
+ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+ f.debug_tuple("Builder").field(&self.0).finish()
+ }
}
#[cfg(test)]
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.