docs(corelib): fix three doc-comment examples#10204
Open
orizi wants to merge 1 commit into
Open
Conversation
- option: add missing `;` in the `Into<T, Option<T>>` example so it compiles - ops::function: close the `FnOnce` code fence and move it after `# Examples` (odd fence count was swallowing the heading in rendered docs) - zeroable: use `u32` instead of `i32` in the `Zeroable::zero` example (`Zeroable` is not implemented for signed integers)
orizi
marked this pull request as ready for review
July 17, 2026 08:03
PR SummaryLow Risk Overview In In In Reviewed by Cursor Bugbot for commit edc03ab. Bugbot is set up for automated code reviews on this repo. Configure here. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Fixes three small documentation bugs in the corelib:
ops/function.cairo: Corrects a misplaced code fence in theFnOncedoc comment. The opening```was placed before the# Examplesheader instead of after it, and the closing```was missing entirely.option.cairo: Adds a missing semicolon at the end of thelet o: Option<u8> = 67_u8.into()statement in theTIntoOptionexample.zeroable.cairo: Fixes the type used in theZeroable::zeroexample fromi32tou32, matching the trait's typical usage with unsigned integers.Type of change
Please check one:
Why is this change needed?
The
FnOncedoc comment had a malformed code block that would render incorrectly in generated documentation. Theoption.cairoexample had a syntax error (missing semicolon) that would fail if executed. Thezeroable.cairoexample referencedi32, which is inconsistent with the unsigned integer context typically associated withZeroable.What was the behavior or documentation before?
FnOnce: The```opening fence appeared before# Examples, and the closing fence was absent, causing the entire example to render as a broken code block.TIntoOption: The example statement67_u8.into()lacked a terminating semicolon.Zeroable::zero: The example usedZeroable::<i32>::zero().What is the behavior or documentation after?
FnOnce: The code fence is correctly placed after# Examples, and the closing fence is present.TIntoOption: The example statement is syntactically valid with a semicolon.Zeroable::zero: The example usesZeroable::<u32>::zero().Related issue or discussion (if any)
None.
Additional context
None.