Add missing semicolon in drop_last_headers function (#1218)
What changed, and why it matters
This commit adds a single missing semicolon at the end of a Rust statement. It is a trivial syntax/style fix with no security relevance. The change does not alter program behavior because Rust automatically treats the last expression of a block as a return value, and the function's return type already matches the returned value.
No security action needed. Treat as normal code-quality maintenance.
Security signals we found
No strong security signals were identified.
Evidence from the diff
In src/chain.rs, the drop_last_headers function ends with a call to self.update(...) whose result was implicitly returned (no trailing semicolon). The commit adds a semicolon, making the return value discarded. Since the function’s return type is the same as self.update(...) and callers likely ignore or use the result, this is a non-functional cleanup. There is no memory safety, logic, or availability issue introduced or fixed.
Changed components
src/chain.rsInspect captured patch +1 / −1
diff --git a/src/chain.rs b/src/chain.rs
index 9f17276..a55e50d 100644
--- a/src/chain.rs
+++ b/src/chain.rs
@@ -53,7 +53,7 @@ impl Chain {
self.update(vec![NewHeader::from((
self.headers[new_height].1,
new_height,
- ))])
+ ))]);
}
/// Load the chain from a collection of headers, up to the given tip
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.