Adjust Script::witness_version doccomment
What changed, and why it matters
This commit only changes a documentation comment for a Rust function. It removes the phrase 'assuming the script is a scriptPubkey' because the code's type system now guarantees the script type. No code behavior was altered, so there is no security impact.
No action needed; this is a non-security documentation cleanup.
Security signals we found
No strong security signals were identified.
Evidence from the diff
A single-line doccomment edit in primitives/src/script/borrowed.rs for Script::witness_version. The change is purely cosmetic/documentation; no logic, API, or safety invariant was modified.
Changed components
primitives/src/script/borrowed.rs documentationInspect captured patch +1 / −1
diff --git a/primitives/src/script/borrowed.rs b/primitives/src/script/borrowed.rs
index 32453c48..fcd2f33f 100644
--- a/primitives/src/script/borrowed.rs
+++ b/primitives/src/script/borrowed.rs
@@ -187,7 +187,7 @@ impl<T> Script<T> {
#[deprecated(since = "1.0.0-rc.0", note = "use `format!(\"{var:x}\")` instead")]
pub fn to_hex(&self) -> alloc::string::String { alloc::format!("{:x}", self) }
- /// Returns witness version of the script, if any, assuming the script is a `scriptPubkey`.
+ /// Returns witness version of the script, if any.
///
/// # Returns
///
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.